summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativegridview.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-30 03:28:43 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-30 03:41:08 (GMT)
commit68d3e2da7719ff0fc230e8204946b27018e42c14 (patch)
tree63bfb52ada494e3498f53600787dfd5c1f7f9130 /src/declarative/graphicsitems/qdeclarativegridview.cpp
parent8368e041e35ab2a79c79f651a56e6ee53a46549f (diff)
downloadQt-68d3e2da7719ff0fc230e8204946b27018e42c14.zip
Qt-68d3e2da7719ff0fc230e8204946b27018e42c14.tar.gz
Qt-68d3e2da7719ff0fc230e8204946b27018e42c14.tar.bz2
Fix parenting after 6f88388db4e8e202780d789e66664ff824691948.
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativegridview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 17f74db..250832b 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -372,7 +372,7 @@ FxGridItem *QDeclarativeGridViewPrivate::createItem(int modelIndex)
listItem->item->setZValue(1);
// complete
model->completeItem();
- listItem->item->setParent(q->viewport());
+ listItem->item->setParentItem(q->viewport());
unrequestedItems.remove(listItem->item);
}
requestedIndex = -1;
@@ -644,7 +644,7 @@ void QDeclarativeGridViewPrivate::createHighlight()
QDeclarativeContext *highlightContext = new QDeclarativeContext(qmlContext(q));
QObject *nobj = highlightComponent->create(highlightContext);
if (nobj) {
- highlightContext->setParent(nobj);
+ QDeclarative_setParent_noEvent(highlightContext, nobj);
item = qobject_cast<QDeclarativeItem *>(nobj);
if (!item)
delete nobj;
@@ -653,10 +653,12 @@ void QDeclarativeGridViewPrivate::createHighlight()
}
} else {
item = new QDeclarativeItem;
- item->setParent(q->viewport());
+ QDeclarative_setParent_noEvent(item, q->viewport());
+ item->setParentItem(q->viewport());
}
if (item) {
- item->setParent(q->viewport());
+ QDeclarative_setParent_noEvent(item, q->viewport());
+ item->setParentItem(q->viewport());
highlight = new FxGridItem(item, q);
highlightXAnimator = new QDeclarativeEaseFollow(q);
highlightXAnimator->setTarget(QDeclarativeProperty(highlight->item, QLatin1String("x")));
@@ -2180,7 +2182,6 @@ void QDeclarativeGridView::modelReset()
void QDeclarativeGridView::createdItem(int index, QDeclarativeItem *item)
{
Q_D(QDeclarativeGridView);
- item->setParentItem(this);
if (d->requestedIndex != index) {
item->setParentItem(this);
d->unrequestedItems.insert(item, index);