aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qquickvisualdatamodel/data/itemsDestroyed_listView.qml
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-11-16 13:08:16 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-21 06:16:30 +0100
commita45c4ce878e49c3d2b0e5525fe6b6cbf8cceef99 (patch)
tree4598c0190ae0ad499e5aea392dcf722d63999a56 /tests/auto/declarative/qquickvisualdatamodel/data/itemsDestroyed_listView.qml
parent2b3328fc4df942954d6b9d7c134d8d55c66d38c5 (diff)
Don't leak objects when a VisualDataModel is destroyed before a view.
If an item is still referenced by a view when the VisualDataModel is destroyed delete it, otherwise it will leak as the view have no interface to release it and deleting the item won't delete the package. Task-number: QTBUG-22672 Change-Id: I7b89962d724d7a391c97722638e03b7a186b8a8f Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qquickvisualdatamodel/data/itemsDestroyed_listView.qml')
-rw-r--r--tests/auto/declarative/qquickvisualdatamodel/data/itemsDestroyed_listView.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/declarative/qquickvisualdatamodel/data/itemsDestroyed_listView.qml b/tests/auto/declarative/qquickvisualdatamodel/data/itemsDestroyed_listView.qml
new file mode 100644
index 0000000000..103c4d2eb6
--- /dev/null
+++ b/tests/auto/declarative/qquickvisualdatamodel/data/itemsDestroyed_listView.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.0
+
+ListView {
+ width: 100
+ height: 100
+
+ model: myModel
+ delegate: Item {
+ objectName: "delegate"
+ width: 100
+ height: 20
+ }
+}