aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/ContentComponent.qml
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-04-27 09:15:11 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-04 05:51:29 +0200
commit186abc1e085e4fae7631e329f44e68a810bca38b (patch)
treeab4ca7211a2a9f788f8790e52579396762ad4213 /tests/auto/qml/qqmlecmascript/data/ContentComponent.qml
parent9ae289f259f80458caf7c788ee07357db7e1257a (diff)
Ensure binding target has not been deleted
Prevent the evaluation of bindings if the target has been deleted. Also, mark an item as queued for deletion at the beginning of the destructor call chain, so that bindings triggered by the operation of the destructor itself are not evaluated (after the context is destructed, if necessary). Task-number: QTBUG-25516 Change-Id: I587ef7923eb749eb7980156ad73822c1fb7c1ff3 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/ContentComponent.qml')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/ContentComponent.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/ContentComponent.qml b/tests/auto/qml/qqmlecmascript/data/ContentComponent.qml
new file mode 100644
index 0000000000..7710624cc2
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/ContentComponent.qml
@@ -0,0 +1,9 @@
+import QtQuick 2.0
+
+Item {
+ property bool validParentChildCount: parent && (parent.children.length > 0)
+
+ onValidParentChildCountChanged: {
+ if (!validParentChildCount) console.warn('WARNING: Invalid parent child count')
+ }
+}