aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-09-07 13:31:14 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-09-27 08:37:39 +0000
commitc08423ac01be53a40226b30e62d2d50d1fca9fd5 (patch)
treebf5803dcfd215b3f53f18e0479971cb2a4d3b5ad /src/qml/qml/qqmlcomponent.cpp
parent480037f2988f5b3010bd6a444cda8e28a24571fd (diff)
QML: Replace QPointer with a QQmlQPointer (which is trivial)
One of the steps needed to make QV4::Heap::structs trivial. Change-Id: Ic4d73f15035af21c8a682aaad1ee68cdd91f8e7d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 5a440bdaf4..337b15d35c 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;
@@ -1488,6 +1489,7 @@ QV4::Heap::QmlIncubatorObject::QmlIncubatorObject(QQmlIncubator::IncubationMode
, statusChanged(QV4::Primitive::undefinedValue())
, qmlContext(0)
{
+ parent.init();
incubator.reset(new QQmlComponentIncubator(this, m));
}