summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativelistview.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-05-06 06:16:08 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-05-06 06:16:08 (GMT)
commitbf965a3b74a10636a63f72d72ad41e169a9851e3 (patch)
treebdc89890964200f2f119e3c92177d924939aa180 /src/declarative/graphicsitems/qdeclarativelistview.cpp
parent385799a8269dfb5b48de9e84e52af780fb400272 (diff)
downloadQt-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.cpp4
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()) {