diff options
author | Andrew den Exter <[email protected]> | 2012-05-25 12:32:28 +1000 |
---|---|---|
committer | Qt by Nokia <[email protected]> | 2012-05-28 05:30:34 +0200 |
commit | d4dad3a0b83c921ed4d746eb9694be8b008bcc1a (patch) | |
tree | f991d840d10a390d7937ae9769505bf45d1fe2c9 /src/quick/items/qquickpathview.cpp | |
parent | 45931aac0cc9e251923453b980d6466028e908eb (diff) |
Don't parent (QObject) delegate items to views.
This keeps object ownership within the context the items were created
in and simplifies lifetime management as the VisualDataModel has sole
license to delete objects and doesn't have to keep guards against a
view and all it's children being deleted.
Delegates are still reparented in the item heirarchy.
Change-Id: Ife5afdfe294a5a8ca1ca3638a086f72452e4915c
Reviewed-by: Martin Jones <[email protected]>
Diffstat (limited to 'src/quick/items/qquickpathview.cpp')
-rw-r--r-- | src/quick/items/qquickpathview.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index fa281cb245..1561dbc00c 100644 --- a/src/quick/items/qquickpathview.cpp +++ b/src/quick/items/qquickpathview.cpp @@ -154,7 +154,6 @@ QQuickItem *QQuickPathViewPrivate::getItem(int modelIndex, qreal z, bool onPath) inRequest = true; QQuickItem *item = model->item(modelIndex, false); if (item) { - QQml_setParent_noEvent(item, q); item->setParentItem(q); requestedIndex = -1; qPathViewAttachedType = attType; @@ -181,7 +180,6 @@ void QQuickPathView::createdItem(int index, QQuickItem *item) att->setOnPath(false); } item->setParentItem(this); - QQml_setParent_noEvent(item, this); d->updateItem(item, index < d->firstIndex ? 0.0 : 1.0); } else { d->requestedIndex = -1; |