diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-11-25 10:29:45 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-26 17:26:49 +0100 |
commit | 2866c00375313d1726cc0473b6b7bfc87b984c78 (patch) | |
tree | b29a10d1fb3238c824b5bbaf0dd6df6e12e8cd9d /src/declarative/qml/qdeclarativeengine.cpp | |
parent | d9ed35f95835def9e3201719d986b56c01b160a2 (diff) |
Allow QtDeclarative and QtQml to co-exist at run-timev5.2.0
This patch changes QDeclarativeData to share the very first bit with QtQml's
QQmlData, to indicate ownership by either run-time. We need to check the bit in
the only QObject callback we use (destroyed), the other callback was unused and
removed.
Task-number: QTBUG-35006
Change-Id: Ife4b515648cba42b91612736ccd9375f1f46808a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index fe33cc3d..a42c6a04 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -556,14 +556,10 @@ void QDeclarativePrivate::qdeclarativeelement_destructor(QObject *o) void QDeclarativeData::destroyed(QAbstractDeclarativeData *d, QObject *o) { - static_cast<QDeclarativeData *>(d)->destroyed(o); -} - -void QDeclarativeData::parentChanged(QAbstractDeclarativeData *d, QObject *o, QObject *p) -{ - Q_UNUSED(d) - Q_UNUSED(o) - Q_UNUSED(p) + QDeclarativeData *ddata = static_cast<QDeclarativeData *>(d); + if (!ddata->ownedByQml1) + return; + ddata->destroyed(o); } void QDeclarativeEnginePrivate::init() |