diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-01 22:27:26 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-01 22:27:26 +0200 |
commit | ead7aea128d81118886721585058b45f037f5613 (patch) | |
tree | d04f8bce4221d7aa40b6e4ef64a28c193a12fa07 /src/qml/qml/qqmlcomponent.cpp | |
parent | 7e742bff27491b5ecd8713540940683264c240a2 (diff) | |
parent | 5f4299eb597b89df20189a5c5a6235287e54b636 (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
src/qml/jsruntime/qv4qobjectwrapper.cpp
Change-Id: I1a125b2334532ec5de4af39c0d6628890f4d0587
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r-- | src/qml/qml/qqmlcomponent.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 41f804f0ae..6eda23c4c3 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -1059,8 +1059,9 @@ namespace Heap { struct QmlIncubatorObject : Object { QmlIncubatorObject(QQmlIncubator::IncubationMode = QQmlIncubator::Asynchronous); + ~QmlIncubatorObject() { parent.destroy(); } QScopedPointer<QQmlComponentIncubator> incubator; - QPointer<QObject> parent; + QQmlQPointer<QObject> parent; QV4::Value valuemap; QV4::Value statusChanged; Pointer<Heap::QmlContext> qmlContext; @@ -1486,8 +1487,9 @@ QQmlComponentExtension::~QQmlComponentExtension() QV4::Heap::QmlIncubatorObject::QmlIncubatorObject(QQmlIncubator::IncubationMode m) : valuemap(QV4::Primitive::undefinedValue()) , statusChanged(QV4::Primitive::undefinedValue()) - , qmlContext(0) { + parent.init(); + qmlContext = nullptr; incubator.reset(new QQmlComponentIncubator(this, m)); } |