diff options
Diffstat (limited to 'tests/auto/qprogressbar/tst_qprogressbar.cpp')
-rw-r--r-- | tests/auto/qprogressbar/tst_qprogressbar.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/qprogressbar/tst_qprogressbar.cpp b/tests/auto/qprogressbar/tst_qprogressbar.cpp index 274c28eeba..ea9798b691 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); } } |