summaryrefslogtreecommitdiffstats
path: root/tests/auto/qprogressbar
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-22 17:19:51 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-22 17:20:29 (GMT)
commitadea8ea0dd70a0a33d07e9ada1d0823b5fc637ac (patch)
tree585754d17d7dee6a6e371dd15b58a72cefa9c70b /tests/auto/qprogressbar
parentf5d6022f4ca4af32de2b683dfb9f41173e7c8934 (diff)
downloadQt-adea8ea0dd70a0a33d07e9ada1d0823b5fc637ac.zip
Qt-adea8ea0dd70a0a33d07e9ada1d0823b5fc637ac.tar.gz
Qt-adea8ea0dd70a0a33d07e9ada1d0823b5fc637ac.tar.bz2
Stabilize some tests
Diffstat (limited to 'tests/auto/qprogressbar')
-rw-r--r--tests/auto/qprogressbar/tst_qprogressbar.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/qprogressbar/tst_qprogressbar.cpp b/tests/auto/qprogressbar/tst_qprogressbar.cpp
index 274c28e..ea9798b 100644
--- a/tests/auto/qprogressbar/tst_qprogressbar.cpp
+++ b/tests/auto/qprogressbar/tst_qprogressbar.cpp
@@ -167,11 +167,12 @@ void tst_QProgressBar::format()
bar.setRange(0, 10);
bar.setValue(1);
bar.show();
+ QTest::qWaitForWindowShown(&bar);
- QTest::qWait(2000);
+ QTest::qWait(20);
bar.repainted = false;
bar.setFormat("%v of %m (%p%)");
- QTest::qWait(2000);
+ QTest::qWait(20);
QVERIFY(bar.repainted);
bar.repainted = false;
bar.setFormat("%v of %m (%p%)");
@@ -197,15 +198,14 @@ void tst_QProgressBar::setValueRepaint()
pbar.setMaximum(10);
pbar.setFormat("%v");
pbar.show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&pbar);
-#endif
+ QTest::qWaitForWindowShown(&pbar);
+
QApplication::processEvents();
for (int i = pbar.minimum(); i < pbar.maximum(); ++i) {
pbar.repainted = false;
pbar.setValue(i);
- QTest::qWait(500);
- QVERIFY(pbar.repainted);
+ QTest::qWait(50);
+ QTRY_VERIFY(pbar.repainted);
}
}