From 51a644360cdf9ef4d936700f02da6cc380ae1f9d Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 28 Oct 2009 11:43:40 +0100 Subject: Make the QPropertyAnimation pass on windows by waiting slightly longer Timers on windows are not accurate enough to "only" wait for the animation duration + 50. --- tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp index 7dd17e5..92bed7d 100644 --- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp @@ -495,7 +495,7 @@ void tst_QPropertyAnimation::startWhenAnotherIsRunning() anim->setEndValue(100); QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State))); anim->start(QVariantAnimation::DeleteWhenStopped); - QTest::qWait(anim->duration() + 50); + QTest::qWait(anim->duration() + 100); QCOMPARE(runningSpy.count(), 2); //started and then stopped QVERIFY(!anim); } @@ -659,7 +659,7 @@ void tst_QPropertyAnimation::playForwardBackward() anim.setStartValue(0); anim.setEndValue(100); anim.start(); - QTest::qWait(anim.duration() + 50); + QTest::qWait(anim.duration() + 100); QCOMPARE(anim.state(), QAbstractAnimation::Stopped); QCOMPARE(anim.currentTime(), anim.duration()); @@ -667,7 +667,7 @@ void tst_QPropertyAnimation::playForwardBackward() anim.setDirection(QVariantAnimation::Backward); anim.start(); QCOMPARE(anim.state(), QAbstractAnimation::Running); - QTest::qWait(anim.duration() + 50); + QTest::qWait(anim.duration() + 100); QCOMPARE(anim.state(), QAbstractAnimation::Stopped); QCOMPARE(anim.currentTime(), 0); @@ -676,7 +676,7 @@ void tst_QPropertyAnimation::playForwardBackward() anim.start(); QCOMPARE(anim.state(), QAbstractAnimation::Running); QCOMPARE(anim.currentTime(), anim.duration()); - QTest::qWait(anim.duration() + 50); + QTest::qWait(anim.duration() + 100); QCOMPARE(anim.state(), QAbstractAnimation::Stopped); QCOMPARE(anim.currentTime(), 0); } -- cgit v0.12