From 66f06a930da0114f62a5470e778182c50117ad27 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 11 Dec 2019 12:47:39 +0100 Subject: 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 --- tests/auto/corelib/text/qlocale/tst_qlocale.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/auto/corelib/text/qlocale/tst_qlocale.cpp') 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); } -- cgit v1.2.3