aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-10-06 16:52:47 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-06 10:44:27 +0200
commit00ee5a5d34f105701f5caf75368326c8009fc020 (patch)
tree12076cb476ceeb3ee0c7c6743184ef55dae00778 /src
parentb801f90eb3679b567795416ceb821e7d2d2221ce (diff)
Ensure view delegates are object parented to the contentItem
Caused a leak which resulted in persistent v8 handles not being disposed. Change-Id: I5c10ff619531976ab61d9ce1ff8327c4a40cfd5e Reviewed-on: http://codereview.qt-project.org/6112 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/items/qsgitemview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/items/qsgitemview.cpp b/src/declarative/items/qsgitemview.cpp
index 3224e32ea4..b34ed8227a 100644
--- a/src/declarative/items/qsgitemview.cpp
+++ b/src/declarative/items/qsgitemview.cpp
@@ -1578,9 +1578,11 @@ FxViewItem *QSGItemViewPrivate::createItem(int modelIndex)
if (model->completePending()) {
// complete
viewItem->item->setZ(1);
+ QDeclarative_setParent_noEvent(viewItem->item, q->contentItem());
viewItem->item->setParentItem(q->contentItem());
model->completeItem();
} else {
+ QDeclarative_setParent_noEvent(viewItem->item, q->contentItem());
viewItem->item->setParentItem(q->contentItem());
}
// do other set up for the new item that should not happen