diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-05-06 06:16:08 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-05-06 06:16:08 (GMT) |
commit | bf965a3b74a10636a63f72d72ad41e169a9851e3 (patch) | |
tree | bdc89890964200f2f119e3c92177d924939aa180 /src/declarative/graphicsitems/qdeclarativelistview.cpp | |
parent | 385799a8269dfb5b48de9e84e52af780fb400272 (diff) | |
download | Qt-bf965a3b74a10636a63f72d72ad41e169a9851e3.zip Qt-bf965a3b74a10636a63f72d72ad41e169a9851e3.tar.gz Qt-bf965a3b74a10636a63f72d72ad41e169a9851e3.tar.bz2 |
Avoid warnings as delegates with bindings to parent are created and destroyed.
Task-number: QTBUG-10359
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativelistview.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativelistview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 0811278..064a33f 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -573,9 +573,11 @@ FxListItem *QDeclarativeListViewPrivate::createItem(int modelIndex) if (model->completePending()) { // complete listItem->item->setZValue(1); + listItem->item->setParentItem(q->viewport()); model->completeItem(); + } else { + listItem->item->setParentItem(q->viewport()); } - listItem->item->setParentItem(q->viewport()); QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item)); itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry); if (sectionCriteria && sectionCriteria->delegate()) { |