summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
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 /tests/auto/corelib/text/qlocale/tst_qlocale.cpp
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 'tests/auto/corelib/text/qlocale/tst_qlocale.cpp')
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index 1a882733a3..6ed06ca237 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -3010,7 +3010,8 @@ void tst_QLocale::systemLocale()
QFETCH(QLocale::Language, language);
{
- MySystemLocale sLocale(name);
+ QLocale locale(name);
+ MySystemLocale sLocale(locale);
QCOMPARE(QLocale().language(), language);
QCOMPARE(QLocale::system().language(), language);
}