summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstring
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/qstring
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/qstring')
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp
index 65f88c0e4d..bfecbf2b4b 100644
--- a/tests/auto/corelib/text/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp
@@ -4776,7 +4776,7 @@ void tst_QString::arg()
is all messed up, because Qt Test itself uses QString::arg().
*/
- TransientDefaultLocale transient(QString("de_DE"));
+ TransientDefaultLocale transient(QLocale(QString("de_DE")));
QString s4( "[%0]" );
QString s5( "[%1]" );
@@ -4924,7 +4924,7 @@ void tst_QString::arg()
QCOMPARE(QString("%1").arg(-1., 3, 'g', -1, QChar('x')), QLatin1String("x-1"));
QCOMPARE(QString("%1").arg(-100., 3, 'g', -1, QChar('x')), QLatin1String("-100"));
- transient.revise(QString("ar"));
+ transient.revise(QLocale(QString("ar")));
QCOMPARE( QString("%L1").arg(12345.6789, 10, 'g', 7, QLatin1Char('0')),
QString::fromUtf8("\xd9\xa0\xd9\xa1\xd9\xa2\xd9\xac\xd9\xa3\xd9\xa4\xd9\xa5\xd9\xab\xd9\xa6\xd9\xa8") ); // "٠١٢٬٣٤٥٫٦٨"
QCOMPARE( QString("%L1").arg(123456789, 13, 10, QLatin1Char('0')),