Fix for co-existence of QtDeclarative and QtQml
As a follow-up to commit 2f87fde9bb, 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>
bb10
parent
9b8570c4e9
commit
e903b5cdda
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1464,7 +1464,10 @@ QWidget::~QWidget()
|
|||
}
|
||||
|
||||
if (d->declarativeData) {
|
||||
QAbstractDeclarativeData::destroyed(d->declarativeData, this);
|
||||
if (QAbstractDeclarativeData::destroyed)
|
||||
QAbstractDeclarativeData::destroyed(d->declarativeData, this);
|
||||
if (QAbstractDeclarativeData::destroyed_qml1)
|
||||
QAbstractDeclarativeData::destroyed_qml1(d->declarativeData, this);
|
||||
d->declarativeData = 0; // don't activate again in ~QObject
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue