Change template parameter to disambiguate call to QLatin1String constructor

Summary:
Qt 5.10 added a new constructor overload which made the call to QLatin1String
constructor with size_t as second parameter ambigious.

Reviewers: #swift_pilot_client, msutcliffe

Reviewed By: #swift_pilot_client, msutcliffe

Subscribers: jenkins

Differential Revision: https://dev.swift-project.org/D47
This commit is contained in:
Roland Winklmeier
2017-08-12 17:32:57 +02:00
committed by Mathew Sutcliffe
parent 4b34aff39d
commit c91aa0d58e

View File

@@ -227,7 +227,7 @@ namespace BlackMisc
};
//! Workaround to constant-initialize QLatin1String on platforms without constexpr strlen.
template <size_t N>
template <int N>
static Q_DECL_CONSTEXPR QLatin1String constQLatin1(const char (&str)[N])
{
return QLatin1String(str, N - 1); // -1 because N includes the null terminator