diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-03-25 00:09:17 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-03-25 00:09:17 (GMT) |
commit | 13d9f49577dd5be8c01792b6d7709c2e9b28aa95 (patch) | |
tree | 158d3b0c437fb88a6f103602f1e392c332bb7a0e /tests/auto/declarative/qdeclarativeanimations | |
parent | 668c9d63d27b2a925c18f3128747c20b37560569 (diff) | |
download | Qt-13d9f49577dd5be8c01792b6d7709c2e9b28aa95.zip Qt-13d9f49577dd5be8c01792b6d7709c2e9b28aa95.tar.gz Qt-13d9f49577dd5be8c01792b6d7709c2e9b28aa95.tar.bz2 |
Replace Animation's repeat property with loops.
You can now loop a fixed number of times as well as forever. The old
repeat behavior (loop forever) can be acheived with loops: Qt.Infinite.
Diffstat (limited to 'tests/auto/declarative/qdeclarativeanimations')
-rw-r--r-- | tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml index 408ad87..ed43082 100644 --- a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml +++ b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml @@ -10,7 +10,7 @@ Rectangle { width: 100; height: 100 color: Qt.rgba(1,0,0) Behavior on x { - NumberAnimation { id: myAnim; objectName: "MyAnim"; target: redRect; property: "y"; to: 300; repeat: true} + NumberAnimation { id: myAnim; objectName: "MyAnim"; target: redRect; property: "y"; to: 300; loops: Qt.Infinite} } } diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp index bce7166..f018ce1 100644 --- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp +++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp @@ -204,9 +204,9 @@ void tst_qdeclarativeanimations::alwaysRunToEnd() animation.setProperty("x"); animation.setTo(200); animation.setDuration(1000); - animation.setRepeat(true); + animation.setLoops(-1); animation.setAlwaysRunToEnd(true); - QVERIFY(animation.repeat() == true); + QVERIFY(animation.loops() == -1); QVERIFY(animation.alwaysRunToEnd() == true); animation.start(); QTest::qWait(1500); |