summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml')
-rw-r--r--tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml b/tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml
new file mode 100644
index 0000000..618723f
--- /dev/null
+++ b/tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+
+MyQmlObject{
+ id: obj
+ objectName: "obj"
+ function create()
+ {
+ obj.objectProperty = createQmlObject('import Qt.test 1.0; MyQmlObject{objectName:"emptyObject"}', obj);
+ }
+
+ function killIt(wait)
+ {
+ if(obj.objectProperty == undefined || obj.objectProperty == null)
+ return;
+ if(wait > 0)
+ obj.objectProperty.destroy(wait);
+ else
+ obj.objectProperty.destroy();
+ }
+}