diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2011-02-18 03:52:10 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2011-02-21 05:00:35 (GMT) |
commit | 8e9c28eaa4d7a3372b9a9a21a984701b62f96456 (patch) | |
tree | e14036cce00381d65ccf655b4d6fef2a10accd1e /tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp | |
parent | fd198736e1da02f535bc81d9934cb4e8412a87bc (diff) | |
download | Qt-8e9c28eaa4d7a3372b9a9a21a984701b62f96456.zip Qt-8e9c28eaa4d7a3372b9a9a21a984701b62f96456.tar.gz Qt-8e9c28eaa4d7a3372b9a9a21a984701b62f96456.tar.bz2 |
Ensure animations start correctly when running is bound to a value.
Animations register to be started when the component is finalized,
but in the case of a binding, the registration doesn't happen until
we are already working with a copy of the finalization list. With this
patch, we no longer work with a copy, but with the actual list.
Change-Id: If460c250d2403590907e9ac854d277db68ba8b2a
Task-number: QTBUG-14042
Reviewed-by: Aaron Kennedy
Diffstat (limited to 'tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp index 6f71dec..d1b7c1b 100644 --- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp +++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp @@ -85,6 +85,7 @@ private slots: void rotation(); void runningTrueBug(); void nonTransitionBug(); + void registrationBug(); }; #define QTIMED_COMPARE(lhs, rhs) do { \ @@ -793,6 +794,17 @@ void tst_qdeclarativeanimations::nonTransitionBug() QCOMPARE(mover->x(), qreal(100)); } +//QTBUG-14042 +void tst_qdeclarativeanimations::registrationBug() +{ + QDeclarativeEngine engine; + + QDeclarativeComponent c(&engine, SRCDIR "/data/registrationBug.qml"); + QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create()); + QVERIFY(rect != 0); + QTRY_COMPARE(rect->property("value"), QVariant(int(100))); +} + QTEST_MAIN(tst_qdeclarativeanimations) #include "tst_qdeclarativeanimations.moc" |