diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-04-21 15:39:37 +0200 |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-04-21 17:29:44 +0200 |
commit | ce482e1495c12e531781eb5ad0a20a0c0292f853 (patch) | |
tree | 3b2d54d68ed9d6d5753f1971cb11363a7f7d1d53 /tests/auto/qpropertyanimation | |
parent | 04ce953e61acf5a73826b6207cf8bf2cdfce8f92 (diff) |
QPropertyAnimation reevaluates the default start value after each run
When the start value is not explicitly defined, the property animation
will set the default start to be the current property value when updating
the animation's state to Running.
Reviewed-by: Jan-Arve
Diffstat (limited to 'tests/auto/qpropertyanimation')
-rw-r--r-- | tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp index 2ab0605d09..437c86213e 100644 --- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp @@ -42,7 +42,6 @@ #include <QtTest/QtTest> #include <QtCore/qpropertyanimation.h> -#include <QtGui/qitemanimation.h> #include <QtGui/qwidget.h> //TESTED_CLASS=QPropertyAnimation @@ -526,13 +525,14 @@ void tst_QPropertyAnimation::startWithoutStartValue() anim.setEndValue(110); anim.start(); current = anim.currentValue().toInt(); - QCOMPARE(current, 42); // the initial default start value - + // the default start value will reevaluate the current property + // and set it to the end value of the last iteration + QCOMPARE(current, 100); QTest::qWait(100); current = anim.currentValue().toInt(); //it is somewhere in the animation - QVERIFY(current > 42); - QVERIFY(current < 110); + QVERIFY(current >= 100); + QVERIFY(current <= 110); } void tst_QPropertyAnimation::playForwardBackward() |