summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/other/qfocusevent/tst_qfocusevent.cpp5
-rw-r--r--tests/auto/other/qobjectrace/tst_qobjectrace.cpp12
2 files changed, 3 insertions, 14 deletions
diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
index 70e696e703..37521a64aa 100644
--- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
+++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
@@ -196,7 +196,6 @@ void tst_QFocusEvent::checkReason_BackTab()
// Now test the backtab key
QTest::keyClick( childFocusWidgetOne, Qt::Key_Backtab );
- QTest::qWait(200);
QTRY_VERIFY(childFocusWidgetOne->focusOutEventRecieved);
QVERIFY(childFocusWidgetTwo->focusInEventRecieved);
@@ -217,7 +216,6 @@ void tst_QFocusEvent::checkReason_Popup()
QMenu* popupMenu = new QMenu( testFocusWidget );
popupMenu->addMenu( "Test" );
popupMenu->popup( QPoint(0,0) );
- QTest::qWait(50);
QTRY_VERIFY(childFocusWidgetOne->focusOutEventLostFocus);
@@ -308,7 +306,7 @@ void tst_QFocusEvent::checkReason_focusWidget()
window1.show();
edit1.setFocus();
- QTest::qWait(100);
+ QTRY_VERIFY(edit1.hasFocus());
edit2.setFocus();
QVERIFY(frame1.focusWidget() != 0);
@@ -344,7 +342,6 @@ void tst_QFocusEvent::checkReason_ActiveWindow()
QVERIFY( !childFocusWidgetOne->hasFocus() );
d->hide();
- QTest::qWait(100);
if (!QGuiApplication::platformName().compare(QLatin1String("offscreen"), Qt::CaseInsensitive)
|| !QGuiApplication::platformName().compare(QLatin1String("minimal"), Qt::CaseInsensitive)) {
diff --git a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
index aa78d70716..e6eb51500b 100644
--- a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
+++ b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
@@ -420,11 +420,7 @@ void tst_QObjectRace::disconnectRace()
threads[i]->start();
}
- QTime timeLimiter;
- timeLimiter.start();
-
- while (timeLimiter.elapsed() < TimeLimit)
- QTest::qWait(10);
+ QTest::qWait(TimeLimit);
for (int i = 0; i < ThreadCount; ++i) {
threads[i]->requestInterruption();
@@ -450,11 +446,7 @@ void tst_QObjectRace::disconnectRace()
threads[i]->start();
}
- QTime timeLimiter;
- timeLimiter.start();
-
- while (timeLimiter.elapsed() < TimeLimit)
- QTest::qWait(10);
+ QTest::qWait(TimeLimit);
senderThread->requestInterruption();
QVERIFY(senderThread->wait(300));