aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-11-17 11:23:52 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-18 06:47:51 +0100
commita06e749b12e07326271760730686b610fda9a5f2 (patch)
treef696d9f23ce8bdf3e457d71fe2041019b8334610 /src
parente20649395615a3d2548a6845330065a8b09436c7 (diff)
Parent delegate items to PathView.
This is consistent with ListView and GridView and ensures the items live only as long as the view and are deleted on application shutdown where deferred delete events are discarded. Change-Id: I77174b2725310d068fbba89b57e0da59619ef22a Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/items/qquickpathview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/items/qquickpathview.cpp b/src/declarative/items/qquickpathview.cpp
index c4da6f5a4c..c7eee841c4 100644
--- a/src/declarative/items/qquickpathview.cpp
+++ b/src/declarative/items/qquickpathview.cpp
@@ -125,6 +125,7 @@ QQuickItem *QQuickPathViewPrivate::getItem(int modelIndex, bool onPath)
att->m_view = q;
att->setOnPath(onPath);
}
+ QDeclarative_setParent_noEvent(item, q);
item->setParentItem(q);
QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
itemPrivate->addItemChangeListener(this, QQuickItemPrivate::Geometry);
@@ -1601,6 +1602,7 @@ void QQuickPathView::createdItem(int index, QQuickItem *item)
att->m_view = this;
att->setOnPath(false);
}
+ QDeclarative_setParent_noEvent(item, this);
item->setParentItem(this);
d->updateItem(item, index < d->firstIndex ? 0.0 : 1.0);
}