summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-12-09 06:24:35 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-12-09 06:24:35 (GMT)
commit32b45ba08745fdcedf6b3537a9f62cd23a5eb1ba (patch)
tree6a33a5221b2f37dfa9782739b0b456cd7496a10b /tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
parent120a12f5dc13dea327cdbbbc94b58f29d1f3306b (diff)
parentf59908d4a6edcd333a156d4c94ddbd9b30f7e810 (diff)
downloadQt-32b45ba08745fdcedf6b3537a9f62cd23a5eb1ba.zip
Qt-32b45ba08745fdcedf6b3537a9f62cd23a5eb1ba.tar.gz
Qt-32b45ba08745fdcedf6b3537a9f62cd23a5eb1ba.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp')
-rw-r--r--tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
index 157c39d..7f03153 100644
--- a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
@@ -1065,17 +1065,20 @@ void tst_QDoubleSpinBox::taskQTBUG_5008_textFromValueAndValidate()
//we use the French delimiters here
QString textFromValue (double value) const
- {
+ {
return locale().toString(value);
}
} spinbox;
spinbox.show();
spinbox.activateWindow();
spinbox.setFocus();
+ QApplication::setActiveWindow(&spinbox);
QTest::qWaitForWindowShown(&spinbox);
- QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value()));
+ QTRY_VERIFY(spinbox.hasFocus());
+ QTRY_COMPARE(static_cast<QWidget *>(&spinbox), QApplication::activeWindow());
+ QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value()));
spinbox.lineEdit()->setCursorPosition(2); //just after the first thousand separator
- QTest::keyClick(0, Qt::Key_0); // let's insert a 0
+ QTest::keyClick(0, Qt::Key_0); // let's insert a 0
QCOMPARE(spinbox.value(), 10000.);
spinbox.clearFocus(); //make sure the value is correctly formatted
QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value()));