summaryrefslogtreecommitdiff
path: root/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2010-08-04 09:27:34 +0200
committermae <qt-info@nokia.com>2010-08-04 09:30:40 +0200
commit33203efb786de9aebc6e05d1b4878d89e86ac456 (patch)
tree77cf3516c81e421c18b9600d94f7d31ae3fed673 /tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
parentded11a8737bf1828c0c4e188ec26af06f590e990 (diff)
downloadqt4-tools-33203efb786de9aebc6e05d1b4878d89e86ac456.tar.gz
Make SpringAnimation usable inside a transition
SpringFollow was turned into SpringAnimation so it could be used inside a Behavior. This patch completes the work and makes it usable inside a transition. This is the documented behavior of SpringAnimation, the patch is essential to make SpringAnimation work consistently. Reviewed-by: Michael Brasser Task-number: QTBUG-12141
Diffstat (limited to 'tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
index 3e80c2c50d..ec867fefdb 100644
--- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -551,6 +551,20 @@ void tst_qdeclarativeanimations::propertiesTransition()
QTest::qWait(waitDuration);
QTIMED_COMPARE(myRect->x(),qreal(100));
}*/
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertiesTransition7.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
+ QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
+ QVERIFY(myRect);
+ QTest::qWait(waitDuration);
+ QTIMED_COMPARE(myRect->x(),qreal(200));
+ }
+
}
void tst_qdeclarativeanimations::invalidDuration()