aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-07-29 13:53:35 +1000
committerQt by Nokia <qt-info@nokia.com>2011-07-29 09:39:41 +0200
commit0e68a621135102cd441e4bce725628a07d51f353 (patch)
tree93919d1c1f6a4311d33b0b41f86c2bdfdfb5cd29 /tests/auto/declarative/qdeclarativeecmascript/data
parent8fed8bf724b0df6e7b63080a98955f2e295f11c6 (diff)
Mark objects from Component.createObject() as destructible
Change-Id: I00a1a2b5cca80c3e2ea097690cadf21581e1356d Task-number: QTBUG-20626 Reviewed-on: http://codereview.qt.nokia.com/2367 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.2.qml21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.2.qml
new file mode 100644
index 0000000000..70c281691b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.2.qml
@@ -0,0 +1,21 @@
+import QtQuick 1.0
+
+QtObject {
+ id: root
+
+ property QtObject objectProperty
+
+ property Component c: Component {
+ id: componentObject
+ QtObject {
+ }
+ }
+
+ function create() {
+ objectProperty = c.createObject(root);
+ }
+
+ function destroy() {
+ objectProperty.destroy();
+ }
+}