summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-14 07:27:45 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-14 08:49:19 (GMT)
commit62b264e90a48997e1736d7a335bad99e2c52a50d (patch)
tree683cd6711510c414566384fba7e1777e703d5390 /src/gui/graphicsview
parent6ae0b924102384d088c9a7f9b43170cf0d2668bd (diff)
downloadQt-62b264e90a48997e1736d7a335bad99e2c52a50d.zip
Qt-62b264e90a48997e1736d7a335bad99e2c52a50d.tar.gz
Qt-62b264e90a48997e1736d7a335bad99e2c52a50d.tar.bz2
Reduce warnings at shutdown
QTBUG-9799 Reviewed-by: Alexis Menard
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 150343e..9e0ec2e 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1408,8 +1408,16 @@ QGraphicsItem::QGraphicsItem(QGraphicsItemPrivate &dd, QGraphicsItem *parent,
*/
QGraphicsItem::~QGraphicsItem()
{
- if (d_ptr->isObject)
- QObjectPrivate::get(static_cast<QGraphicsObject *>(this))->wasDeleted = true;
+ if (d_ptr->isObject) {
+ QGraphicsObject *o = static_cast<QGraphicsObject *>(this);
+ QObjectPrivate *p = QObjectPrivate::get(o);
+ p->wasDeleted = true;
+ if (p->declarativeData) {
+ QDeclarativeData::destroyed(p->declarativeData, o);
+ p->declarativeData = 0;
+ }
+ }
+
d_ptr->inDestructor = 1;
d_ptr->removeExtraItemCache();