diff options
author | Michael Brasser <michael.brasser@jollamobile.com> | 2014-03-12 10:44:28 -0500 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-13 16:39:34 +0100 |
commit | 11e9c49e5420bf749e4da48b1f14fa7dc9e4716f (patch) | |
tree | e98e44253850ec299f07dd8e7fb3d67165b02bad /tests/auto/quick/qquickanimations/tst_qquickanimations.cpp | |
parent | ef635d410dada5c8eaa963d127ccb53eae3194fb (diff) |
Don't crash if a ScriptAction changes state mid-transition.
Change-Id: Ia85cb128c7410e2276bf4da02f946d3d0bf44989
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'tests/auto/quick/qquickanimations/tst_qquickanimations.cpp')
-rw-r--r-- | tests/auto/quick/qquickanimations/tst_qquickanimations.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp index 21872a5528..c167aa66d4 100644 --- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp +++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp @@ -111,6 +111,7 @@ private slots: void pathAnimationInOutBackBug(); void scriptActionBug(); void groupAnimationNullChildBug(); + void scriptActionCrash(); }; #define QTIMED_COMPARE(lhs, rhs) do { \ @@ -1478,6 +1479,20 @@ void tst_qquickanimations::groupAnimationNullChildBug() } } +//ScriptAction should not crash if changing a state in a transition +void tst_qquickanimations::scriptActionCrash() +{ + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("scriptActionCrash.qml")); + QObject *obj = c.create(); + + //just testing that we don't crash + QTest::qWait(1000); //5x transition duration + + delete obj; +} + + QTEST_MAIN(tst_qquickanimations) |