diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-05-25 12:32:28 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-28 05:30:34 +0200 |
commit | d4dad3a0b83c921ed4d746eb9694be8b008bcc1a (patch) | |
tree | f991d840d10a390d7937ae9769505bf45d1fe2c9 /src/quick/items/qquickrepeater.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 <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquickrepeater.cpp')
-rw-r--r-- | src/quick/items/qquickrepeater.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp index ec8dc9d231..db58fba00c 100644 --- a/src/quick/items/qquickrepeater.cpp +++ b/src/quick/items/qquickrepeater.cpp @@ -386,7 +386,6 @@ void QQuickRepeaterPrivate::createItems() break; } deletables[ii] = item; - QQml_setParent_noEvent(item, q->parentItem()); item->setParentItem(q->parentItem()); if (ii > 0 && deletables.at(ii-1)) { item->stackAfter(deletables.at(ii-1)); @@ -415,7 +414,6 @@ void QQuickRepeater::createdItem(int, QQuickItem *) void QQuickRepeater::initItem(int, QQuickItem *item) { - QQml_setParent_noEvent(item, parentItem()); item->setParentItem(parentItem()); } |