diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-28 10:43:40 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-28 10:44:42 (GMT) |
commit | 51a644360cdf9ef4d936700f02da6cc380ae1f9d (patch) | |
tree | 4b8da71a3e8aa1be5ae403cc361c731e20f145db /tests/auto/qpropertyanimation | |
parent | cc34b794439b59e3e226e2a8dc896fec5e27689d (diff) | |
download | Qt-51a644360cdf9ef4d936700f02da6cc380ae1f9d.zip Qt-51a644360cdf9ef4d936700f02da6cc380ae1f9d.tar.gz Qt-51a644360cdf9ef4d936700f02da6cc380ae1f9d.tar.bz2 |
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.
Diffstat (limited to 'tests/auto/qpropertyanimation')
-rw-r--r-- | tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp | 8 |
1 files 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); } |