summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-11-26 10:45:53 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-26 10:57:54 +0100
commite903b5cddaaa606300292ad2cf26c2b6ee111cdd (patch)
treeb29a001b7dc1e6dce61b8a2d6c6305eec3231dee /src/widgets/graphicsview
parent9b8570c4e9359eb8b45b39c28aa9d8c140f3fc44 (diff)
Fix for co-existence of QtDeclarative and QtQml
As a follow-up to commit 2f87fde9bb4bad6787101c0d135419b350b201a5, we also need to change "hack" in the QGraphicsItem and QWidget destructor for early item destruction to support the _qml1 variant of the QObject destroyed callback. Task-number: QTBUG-35006 Change-Id: I65e37b1e9ddd8d14267aaba024408611b8cd3d77 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 7cab132a2e..fffc805637 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -1414,7 +1414,10 @@ QGraphicsItem::~QGraphicsItem()
QObjectPrivate *p = QObjectPrivate::get(o);
p->wasDeleted = true;
if (p->declarativeData) {
- QAbstractDeclarativeData::destroyed(p->declarativeData, o);
+ if (QAbstractDeclarativeData::destroyed)
+ QAbstractDeclarativeData::destroyed(p->declarativeData, o);
+ if (QAbstractDeclarativeData::destroyed_qml1)
+ QAbstractDeclarativeData::destroyed_qml1(p->declarativeData, o);
p->declarativeData = 0;
}
}