From b5e984e2d220596dcc3770969c942bbcf6fdc9a5 Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Fri, 23 Jul 2010 09:32:08 +0200 Subject: Fixed QInputDialog autotest, to compare with the separator defined by the current locale --- tests/auto/qinputdialog/tst_qinputdialog.cpp | 8 +++++--- 1 file 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 @@ -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(sbox, okButton, "0.0"); testTypingValue(sbox, okButton, "foobar"); - testTypingValue(sbox, okButton, QString("%1").arg(origValue)); + testTypingValue(sbox, okButton, loc.toString(origValue)); } void testGetText(QInputDialog *dialog) -- cgit v0.12