diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml b/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml new file mode 100644 index 0000000..074851a --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/selfDeletingBinding.qml @@ -0,0 +1,18 @@ +import Qt.test 1.0 + +MyQmlContainer { + property bool triggerDelete: false + + children: [ + MyQmlObject { + // Will trigger deletion during binding evaluation + stringProperty: {deleteMe(), "Hello"} + }, + + MyQmlObject { + // Will trigger deletion during binding evaluation, but after component creation + stringProperty: if (triggerDelete) { deleteMe(), "Hello" } else { "World" } + } + + ] +} |