diff options
author | Charles Yin <yinyunqiao@gmail.com> | 2012-03-17 00:26:58 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-16 05:26:57 +0200 |
commit | 5bbb2e195b2cee8dbea0715ebf6eef41f36a3100 (patch) | |
tree | 884ee73c75f07a2add74896b9253e463da41a02f /tests/auto/quick/qquickanimations/tst_qquickanimations.cpp | |
parent | 99d9d9a38dd14d8d97d61ab25ce5bc37bb66d0d6 (diff) |
Add a new running property to QQuickTransition
This read only property can be used to track the transition running
state. As all animation items inside a Transition item are just
animation defination templetes, so their running properties won't be
updated during the transition animations running, which makes it
hard to know the current running state of a transition animation.
Change-Id: If7fc0616ba384abc6bf2da67c7c639430c3d8fb9
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickanimations/tst_qquickanimations.cpp')
-rw-r--r-- | tests/auto/quick/qquickanimations/tst_qquickanimations.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp index 166f4b8276..878cd55eb9 100644 --- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp +++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp @@ -961,11 +961,12 @@ void tst_qquickanimations::disabledTransition() QCOMPARE(myRect->x(),qreal(200)); trans->setEnabled(true); - + QSignalSpy runningSpy(trans, SIGNAL(runningChanged())); QQuickItemPrivate::get(rect)->setState(""); QCOMPARE(myRect->x(),qreal(200)); QTest::qWait(300); QTIMED_COMPARE(myRect->x(),qreal(100)); + QCOMPARE(runningSpy.count(), 2); //stopped, running, stopped } void tst_qquickanimations::invalidDuration() |