diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-02-03 01:22:28 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-02-03 01:22:28 (GMT) |
commit | 9da60fd314e0a307a9247552e416ca09ac613dd2 (patch) | |
tree | fe7a213110ad91b540b45e6b4e9226ad27599cd6 /src | |
parent | 1d38a1f5a626c148347ca61dd0f96d32c1d3699d (diff) | |
parent | dcd54618d1fdaf0cdc8de1c2b34d0662afe8158c (diff) | |
download | Qt-9da60fd314e0a307a9247552e416ca09ac613dd2.zip Qt-9da60fd314e0a307a9247552e416ca09ac613dd2.tar.gz Qt-9da60fd314e0a307a9247552e416ca09ac613dd2.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsloader.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsloader.cpp b/src/declarative/graphicsitems/qmlgraphicsloader.cpp index bb1020c..7cd4d1a 100644 --- a/src/declarative/graphicsitems/qmlgraphicsloader.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsloader.cpp @@ -64,8 +64,14 @@ void QmlGraphicsLoaderPrivate::clear() } source = QUrl(); - delete item; - item = 0; + if (item) { + // We can't delete immediately because our item may have triggered + // the Loader to load a different item. + item->setVisible(false); + static_cast<QGraphicsItem*>(item)->setParentItem(0); + item->deleteLater(); + item = 0; + } } void QmlGraphicsLoaderPrivate::initResize() |