diff options
author | Charles Yin <charles.yin@nokia.com> | 2012-05-08 10:42:28 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-09 00:56:16 +0200 |
commit | 68b899266ca209d43026376a6cf9d7bbdc3483b8 (patch) | |
tree | 0a0d2068c5dcafc2d86883405025db33e00b2373 /src/qml/qml/qqmldata_p.h | |
parent | 08bafae3a1c148353e3f37f9966b9ecc28ba3a5f (diff) |
Better checking top level root object creation status
Add QQmlContextData::isRootObjectInCreation flag, only set it to true in Init qml instruction,
once a root ojbect created, set it to false and set QQmlData::rootObjectInCreation to true.
Change-Id: Iba7b348ab664a472280d8d7283e93787b3dd0a56
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmldata_p.h')
-rw-r--r-- | src/qml/qml/qqmldata_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmldata_p.h b/src/qml/qml/qqmldata_p.h index 08f68b661e..2c2c597de4 100644 --- a/src/qml/qml/qqmldata_p.h +++ b/src/qml/qml/qqmldata_p.h @@ -79,7 +79,7 @@ class Q_QML_EXPORT QQmlData : public QAbstractDeclarativeData public: QQmlData() : ownMemory(true), ownContext(false), indestructible(true), explicitIndestructibleSet(false), - hasTaintedV8Object(false), isQueuedForDeletion(false), inCreation(false), notifyList(0), context(0), outerContext(0), + hasTaintedV8Object(false), isQueuedForDeletion(false), rootObjectInCreation(false), notifyList(0), context(0), outerContext(0), bindings(0), signalHandlers(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0), bindingBits(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0), v8objectid(0), propertyCache(0), guards(0), extendedData(0) { @@ -116,10 +116,10 @@ public: quint32 hasTaintedV8Object:1; quint32 isQueuedForDeletion:1; /* - * inCreation should be true only when creating top level CPP and QML objects, - * v8 GC will check this flag, only deletes the objects when inCreation is false. + * rootObjectInCreation should be true only when creating top level CPP and QML objects, + * v8 GC will check this flag, only deletes the objects when rootObjectInCreation is false. */ - quint32 inCreation:1; + quint32 rootObjectInCreation:1; quint32 dummy:25; struct NotifyList { |