diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-09 04:22:07 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-09 04:22:07 (GMT) |
commit | 6a5891e7bfd182a52fd71f1b5fdf4d73def63603 (patch) | |
tree | 483385969c470974d505c32184620add5f841d5c /src/declarative/qml/qdeclarativedeclarativedata_p.h | |
parent | c04a6e34b3d4da24d3cc26e192bebff2d3b79d19 (diff) | |
download | Qt-6a5891e7bfd182a52fd71f1b5fdf4d73def63603.zip Qt-6a5891e7bfd182a52fd71f1b5fdf4d73def63603.tar.gz Qt-6a5891e7bfd182a52fd71f1b5fdf4d73def63603.tar.bz2 |
Integrate QML's object ownership with the JS collector
QML now behaves in a way similar to QtScript when it comes to QObject
ownership.
QT-2803
Diffstat (limited to 'src/declarative/qml/qdeclarativedeclarativedata_p.h')
-rw-r--r-- | src/declarative/qml/qdeclarativedeclarativedata_p.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/declarative/qml/qdeclarativedeclarativedata_p.h b/src/declarative/qml/qdeclarativedeclarativedata_p.h index ae40130..ffce9c9 100644 --- a/src/declarative/qml/qdeclarativedeclarativedata_p.h +++ b/src/declarative/qml/qdeclarativedeclarativedata_p.h @@ -67,12 +67,21 @@ class Q_AUTOTEST_EXPORT QDeclarativeDeclarativeData : public QDeclarativeData { public: QDeclarativeDeclarativeData(QDeclarativeContext *ctxt = 0) - : context(ctxt), bindings(0), nextContextObject(0), prevContextObject(0), - bindingBitsSize(0), bindingBits(0), outerContext(0), lineNumber(0), - columnNumber(0), deferredComponent(0), deferredIdx(0), attachedProperties(0), - propertyCache(0), guards(0) {} + : indestructible(true), explicitIndestructibleSet(false), context(ctxt), + bindings(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0), bindingBits(0), + outerContext(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0), + attachedProperties(0), propertyCache(0), guards(0) {} virtual void destroyed(QObject *); + virtual void parentChanged(QObject *, QObject *); + + void setImplicitDestructible() { + if (!explicitIndestructibleSet) indestructible = false; + } + + quint32 indestructible:1; + quint32 explicitIndestructibleSet:1; + quint32 dummy:29; QDeclarativeContext *context; QDeclarativeAbstractBinding *bindings; |