aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickanimations/data/targetsDeletedWithoutRemoval.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickanimations/data/targetsDeletedWithoutRemoval.qml')
-rw-r--r--tests/auto/quick/qquickanimations/data/targetsDeletedWithoutRemoval.qml29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickanimations/data/targetsDeletedWithoutRemoval.qml b/tests/auto/quick/qquickanimations/data/targetsDeletedWithoutRemoval.qml
new file mode 100644
index 0000000000..e31caa1905
--- /dev/null
+++ b/tests/auto/quick/qquickanimations/data/targetsDeletedWithoutRemoval.qml
@@ -0,0 +1,29 @@
+import QtQuick
+
+Item {
+ id: root
+
+ property list<Translate> targets
+ property alias animTargets: animation.targets
+
+ Component {
+ id: trComponent
+ Translate {}
+ }
+
+ Component.onCompleted: {
+ const target = trComponent.createObject(this);
+ targets.push(target);
+ target.destroy();
+ // give event loop some time to actually stop the animation and destroy the target
+ Qt.callLater(animation.start);
+ }
+
+ NumberAnimation {
+ id: animation
+ targets: root.targets
+ property: "x"
+ running: false
+ to: 100
+ }
+}