aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtquick2/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp')
-rw-r--r--tests/auto/qtquick2/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qtquick2/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp b/tests/auto/qtquick2/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp
index 15a3263eed..64956d7753 100644
--- a/tests/auto/qtquick2/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp
+++ b/tests/auto/qtquick2/qdeclarativespringanimation/tst_qdeclarativespringanimation.cpp
@@ -88,7 +88,9 @@ void tst_qdeclarativespringanimation::values()
{
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, testFileUrl("springanimation2.qml"));
- QDeclarativeSpringAnimation *obj = qobject_cast<QDeclarativeSpringAnimation*>(c.create());
+ QObject *root = c.create();
+
+ QDeclarativeSpringAnimation *obj = root->findChild<QDeclarativeSpringAnimation*>();
QVERIFY(obj != 0);