summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2018-04-06 16:25:21 +0300
committerKari Oikarinen <kari.oikarinen@qt.io>2018-04-25 11:55:34 +0000
commit0cb940b1d3b9a1ba50f2d1973fca411706da266d (patch)
tree326e6a32edef67c9e4000862a47fa49db2dd8263 /tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
parent7917305aa5acdad117632bc2723d9bec85daa0e0 (diff)
tests/auto/widgets/widgets: Avoid unconditional qWait()s
Task-number: QTBUG-63992 Change-Id: I7b0c259800082284ddae4e25d139ad3adc858467 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp')
-rw-r--r--tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp b/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
index c9699bfb81..0cbab5e17c 100644
--- a/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
+++ b/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
@@ -83,6 +83,7 @@ void tst_QCheckBox::initTestCase()
testWidget->setObjectName("testObject");
testWidget->resize( 200, 200 );
testWidget->show();
+ QVERIFY(QTest::qWaitForWindowActive(testWidget));
}
void tst_QCheckBox::cleanupTestCase()
@@ -240,13 +241,11 @@ void tst_QCheckBox::pressed()
QVERIFY( !testWidget->isChecked() );
QTest::keyPress( testWidget, Qt::Key_Space );
- QTest::qWait(100);
QVERIFY( press_count == 1 );
QVERIFY( release_count == 0 );
QVERIFY( !testWidget->isChecked() );
QTest::keyRelease( testWidget, Qt::Key_Space );
- QTest::qWait(100);
QVERIFY( press_count == 1 );
QVERIFY( release_count == 1 );
QVERIFY( testWidget->isChecked() );