From c91aa0d58ee5a44b2d3fcc5cad4bbf5b57680176 Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Sat, 12 Aug 2017 17:32:57 +0200 Subject: [PATCH] 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 --- src/blackmisc/pq/measurementunit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blackmisc/pq/measurementunit.h b/src/blackmisc/pq/measurementunit.h index f2ed164af..a65860239 100644 --- a/src/blackmisc/pq/measurementunit.h +++ b/src/blackmisc/pq/measurementunit.h @@ -227,7 +227,7 @@ namespace BlackMisc }; //! Workaround to constant-initialize QLatin1String on platforms without constexpr strlen. - template + template static Q_DECL_CONSTEXPR QLatin1String constQLatin1(const char (&str)[N]) { return QLatin1String(str, N - 1); // -1 because N includes the null terminator