From 11e9c49e5420bf749e4da48b1f14fa7dc9e4716f Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 12 Mar 2014 10:44:28 -0500 Subject: Don't crash if a ScriptAction changes state mid-transition. Change-Id: Ia85cb128c7410e2276bf4da02f946d3d0bf44989 Reviewed-by: Gunnar Sletta --- .../auto/quick/qquickanimations/tst_qquickanimations.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/auto/quick/qquickanimations/tst_qquickanimations.cpp') 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) -- cgit v1.2.3