aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmldata_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmldata_p.h')
-rw-r--r--src/qml/qml/qqmldata_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/qml/qqmldata_p.h b/src/qml/qml/qqmldata_p.h
index 98407e53b5..568a43e36e 100644
--- a/src/qml/qml/qqmldata_p.h
+++ b/src/qml/qml/qqmldata_p.h
@@ -200,6 +200,13 @@ public:
}
}
+ static bool keepAliveDuringGarbageCollection(const QObject *object) {
+ QQmlData *ddata = get(object);
+ if (!ddata || ddata->indestructible || ddata->rootObjectInCreation)
+ return true;
+ return false;
+ }
+
bool hasExtendedData() const { return extendedData != 0; }
QHash<int, QObject *> *attachedProperties() const;