diff options
author | Robin Burchell <robin.burchell@viroteck.net> | 2014-08-18 15:51:18 +0200 |
---|---|---|
committer | Robin Burchell <robin.burchell@viroteck.net> | 2014-08-18 20:57:23 +0200 |
commit | ef1ee956c1c328efe93be1c45a510d4567e9a926 (patch) | |
tree | 3dd0f56e9769e419eff87abb23c8b84db253e565 /tests | |
parent | e8012b0405c81f93ddae1410957a0d60f6e7a1a3 (diff) |
tst_qmouseevent_modal: Replace some qWait with QTRY_VERIFY.
Takes the total time for this test from ~1.2 seconds to ~0.42 seconds for me.
Change-Id: I426e600a7afe01d7343108b432eda8b83d6f3d85
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp index 48f079a24e..901699e8b5 100644 --- a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp +++ b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp @@ -143,32 +143,28 @@ void tst_qmouseevent_modal::mousePressRelease() QVERIFY( w->d->count() == 0 ); QTest::mousePress( w->pb, Qt::LeftButton ); - QTest::qWait(200); - QVERIFY( !w->d->isVisible() ); + QTRY_VERIFY( !w->d->isVisible() ); QVERIFY( w->d->count() == 1 ); QVERIFY( !w->pb->isDown() ); QTest::mousePress( w->pb, Qt::LeftButton ); - QTest::qWait(200); - QVERIFY( !w->d->isVisible() ); + QTRY_VERIFY( !w->d->isVisible() ); QVERIFY( w->d->count() == 2 ); QVERIFY( !w->pb->isDown() ); // With the current QWS mouse handling, the 3rd press would fail... QTest::mousePress( w->pb, Qt::LeftButton ); - QTest::qWait(200); - QVERIFY( !w->d->isVisible() ); + QTRY_VERIFY( !w->d->isVisible() ); QVERIFY( w->d->count() == 3 ); QVERIFY( !w->pb->isDown() ); QTest::mousePress( w->pb, Qt::LeftButton ); - QTest::qWait(200); - QVERIFY( !w->d->isVisible() ); + QTRY_VERIFY( !w->d->isVisible() ); QVERIFY( w->d->count() == 4 ); QVERIFY( !w->pb->isDown() ); } |