diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-14 07:27:45 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-14 08:49:19 (GMT) |
commit | 62b264e90a48997e1736d7a335bad99e2c52a50d (patch) | |
tree | 683cd6711510c414566384fba7e1777e703d5390 /src/gui/graphicsview | |
parent | 6ae0b924102384d088c9a7f9b43170cf0d2668bd (diff) | |
download | Qt-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.cpp | 12 |
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(); |