summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qlocale.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2019-12-11 12:47:39 +0100
committerLars Knoll <lars.knoll@qt.io>2020-04-01 09:29:26 +0100
commit66f06a930da0114f62a5470e778182c50117ad27 (patch)
tree0c6ab19aea2142838c7237090aace3c02bc4a6d7 /src/corelib/text/qlocale.h
parent098d2edb07e08da6485fee4efbea72f43ddc766e (diff)
Make QLocale(QString) explicit
We should not implicitly convert a QString to a QLocale object. It can easily create unwanted side effects. Change-Id: I7bd9b4a4e4512c0e60176ee4d241d172f00fdc32 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/text/qlocale.h')
-rw-r--r--src/corelib/text/qlocale.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/text/qlocale.h b/src/corelib/text/qlocale.h
index 3f1a8f2679..ca2b5a007f 100644
--- a/src/corelib/text/qlocale.h
+++ b/src/corelib/text/qlocale.h
@@ -941,7 +941,7 @@ public:
Q_FLAG(DataSizeFormats)
QLocale();
- QLocale(const QString &name);
+ explicit QLocale(const QString &name);
QLocale(Language language, Country country = AnyCountry);
QLocale(Language language, Script script, Country country);
QLocale(const QLocale &other);