summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp12
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()