summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-09 12:11:46 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-09 12:46:14 (GMT)
commit720f4ca0ec3b42a101ac24b2cf74cdc87d29eac9 (patch)
tree393500ecb9058080337c0640c2d69a68ab611ba4 /tests/auto
parentddd2a54224e651ff45af834201eec1be2c56d583 (diff)
downloadQt-720f4ca0ec3b42a101ac24b2cf74cdc87d29eac9.zip
Qt-720f4ca0ec3b42a101ac24b2cf74cdc87d29eac9.tar.gz
Qt-720f4ca0ec3b42a101ac24b2cf74cdc87d29eac9.tar.bz2
Fix QString::arg: When specifying %L1, the group separator would be added even if the local specify QLocale::OmitGroupSeparator
Task-number: QTBUG-9281 Reviewed-by: Denis
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qstring/tst_qstring.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qstring/tst_qstring.cpp b/tests/auto/qstring/tst_qstring.cpp
index c887936..ef82769 100644
--- a/tests/auto/qstring/tst_qstring.cpp
+++ b/tests/auto/qstring/tst_qstring.cpp
@@ -208,6 +208,7 @@ private slots:
void repeated_data() const;
void task262677remove();
void QTBUG10404_compareRef();
+ void QTBUG9281_arg_locale();
};
typedef QList<int> IntList;
@@ -4860,6 +4861,17 @@ void tst_QString::QTBUG10404_compareRef()
QVERIFY(QStringRef(&a2, 1, 2).compare(QStringRef(&a, 1, 3), Qt::CaseInsensitive) < 0);
}
+void tst_QString::QTBUG9281_arg_locale()
+{
+ QLocale l(QLocale::English, QLocale::UnitedKingdom);
+ l.setNumberOptions(QLocale::OmitGroupSeparator);
+ QLocale::setDefault(l);
+ QString str("*%L1*%L2*");
+ str = str.arg(123456).arg(1234.56);
+ QCOMPARE(str, QString::fromLatin1("*123456*1234.56*"));
+ QLocale::setDefault(QLocale::C);
+}
+
QTEST_APPLESS_MAIN(tst_QString)