diff options
author | Dominik Holland <dominik.holland@nokia.com> | 2010-07-23 09:32:08 +0200 |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2010-11-02 15:26:31 +0100 |
commit | b5e984e2d220596dcc3770969c942bbcf6fdc9a5 (patch) | |
tree | a016e7b55811f0101b2c070a029138586ac04686 | |
parent | 4280dd6bf4831379eea17e145df1fabc6a9fb901 (diff) | |
download | qt4-tools-b5e984e2d220596dcc3770969c942bbcf6fdc9a5.tar.gz |
Fixed QInputDialog autotest, to compare with the separator defined by the current locale
-rw-r--r-- | tests/auto/qinputdialog/tst_qinputdialog.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/qinputdialog/tst_qinputdialog.cpp b/tests/auto/qinputdialog/tst_qinputdialog.cpp index 5d031421c6..580c6442ab 100644 --- a/tests/auto/qinputdialog/tst_qinputdialog.cpp +++ b/tests/auto/qinputdialog/tst_qinputdialog.cpp @@ -147,9 +147,10 @@ void testInvalidateAndRestore( QVERIFY(sbox->hasAcceptableInput()); QVERIFY(okButton->isEnabled()); QCOMPARE(sbox->value(), lastValidValue); + QLocale loc; QCOMPARE( normalizeNumericString(ledit->text()), - normalizeNumericString(QString("%1").arg(sbox->value()))); + normalizeNumericString(loc.toString(sbox->value()))); } template <typename SpinBoxType, typename ValueType> @@ -169,9 +170,10 @@ void testGetNumeric(QInputDialog *dialog, SpinBoxType * = 0, ValueType * = 0) QVERIFY(sbox->value() >= sbox->minimum()); QVERIFY(sbox->value() <= sbox->maximum()); QVERIFY(sbox->hasAcceptableInput()); + QLocale loc; QCOMPARE( normalizeNumericString(ledit->selectedText()), - normalizeNumericString(QString("%1").arg(sbox->value()))); + normalizeNumericString(loc.toString(sbox->value()))); QVERIFY(okButton->isEnabled()); const ValueType origValue = sbox->value(); @@ -185,7 +187,7 @@ void testGetNumeric(QInputDialog *dialog, SpinBoxType * = 0, ValueType * = 0) testTypingValue<SpinBoxType>(sbox, okButton, "0.0"); testTypingValue<SpinBoxType>(sbox, okButton, "foobar"); - testTypingValue<SpinBoxType>(sbox, okButton, QString("%1").arg(origValue)); + testTypingValue<SpinBoxType>(sbox, okButton, loc.toString(origValue)); } void testGetText(QInputDialog *dialog) |