summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@nokia.com>2010-07-23 07:32:08 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2010-11-02 14:26:31 (GMT)
commitb5e984e2d220596dcc3770969c942bbcf6fdc9a5 (patch)
treea016e7b55811f0101b2c070a029138586ac04686
parent4280dd6bf4831379eea17e145df1fabc6a9fb901 (diff)
downloadQt-b5e984e2d220596dcc3770969c942bbcf6fdc9a5.zip
Qt-b5e984e2d220596dcc3770969c942bbcf6fdc9a5.tar.gz
Qt-b5e984e2d220596dcc3770969c942bbcf6fdc9a5.tar.bz2
Fixed QInputDialog autotest, to compare with the separator defined by the current locale
-rw-r--r--tests/auto/qinputdialog/tst_qinputdialog.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/qinputdialog/tst_qinputdialog.cpp b/tests/auto/qinputdialog/tst_qinputdialog.cpp
index 5d03142..580c644 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)