From 0f6ab9612eba6c5418991443b65a10820d6b5a1f Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Tue, 27 Oct 2009 09:56:28 +0100 Subject: Stabilize sequential animation startDelay autotest on win Reviewed-by: thierry --- .../tst_qsequentialanimationgroup.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp index aa6801a..f6afc5b 100644 --- a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp +++ b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp @@ -929,16 +929,13 @@ void tst_QSequentialAnimationGroup::startDelay() group.addPause(125); QCOMPARE(group.totalDuration(), 375); - QEventLoop loop; - QObject::connect(&group, SIGNAL(finished()), &loop, SLOT(quit())); - - QTime time; - time.start(); group.start(); - loop.exec(); + QCOMPARE(group.state(), QAnimationGroup::Running); - QVERIFY(time.elapsed() >= 375); - QVERIFY(time.elapsed() < 1000); + QTest::qWait(500); + + QVERIFY(group.currentTime() == 375); + QCOMPARE(group.state(), QAnimationGroup::Stopped); } void tst_QSequentialAnimationGroup::clearGroup() -- cgit v0.12