diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-08 11:52:15 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-08 14:12:14 (GMT) |
commit | e38529caa8e188b83c529e3eaca4eab8b8ab393d (patch) | |
tree | bfe8af60e76627fb3954dfe73bd35b043a358dfa /tests/auto/qspinbox | |
parent | 712bdb01662a5724fa593937cfbb447f936998d4 (diff) | |
download | Qt-e38529caa8e188b83c529e3eaca4eab8b8ab393d.zip Qt-e38529caa8e188b83c529e3eaca4eab8b8ab393d.tar.gz Qt-e38529caa8e188b83c529e3eaca4eab8b8ab393d.tar.bz2 |
Stabilize Tests
Diffstat (limited to 'tests/auto/qspinbox')
-rw-r--r-- | tests/auto/qspinbox/tst_qspinbox.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/qspinbox/tst_qspinbox.cpp b/tests/auto/qspinbox/tst_qspinbox.cpp index 4829b6b..2389060 100644 --- a/tests/auto/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/qspinbox/tst_qspinbox.cpp @@ -980,26 +980,28 @@ void tst_QSpinBox::sizeHint() sizeHint_SpinBox *spinBox = new sizeHint_SpinBox; layout->addWidget(spinBox); widget->show(); - QTest::qWait(100); + QTest::qWaitForWindowShown(widget); // Prefix spinBox->sizeHintRequests = 0; spinBox->setPrefix(QLatin1String("abcdefghij")); qApp->processEvents(); - QVERIFY(spinBox->sizeHintRequests > 0); + QTRY_VERIFY(spinBox->sizeHintRequests > 0); // Suffix spinBox->sizeHintRequests = 0; spinBox->setSuffix(QLatin1String("abcdefghij")); qApp->processEvents(); - QVERIFY(spinBox->sizeHintRequests > 0); + QTRY_VERIFY(spinBox->sizeHintRequests > 0); // Range spinBox->sizeHintRequests = 0; spinBox->setRange(0, 1234567890); spinBox->setValue(spinBox->maximum()); qApp->processEvents(); - QVERIFY(spinBox->sizeHintRequests > 0); + QTRY_VERIFY(spinBox->sizeHintRequests > 0); + + delete widget; } QTEST_MAIN(tst_QSpinBox) |