diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-10-11 02:07:24 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-10-11 02:07:24 (GMT) |
commit | 759da9b325f19670a3d79ede5f06fb3fa1f95495 (patch) | |
tree | 11403d8cfa3c8c0f1cf62c9f29108a34e8f30b7d /src/declarative/qml/qdeclarativedata_p.h | |
parent | f69eeec7030a5df12803a9128819207e3fc5bead (diff) | |
download | Qt-759da9b325f19670a3d79ede5f06fb3fa1f95495.zip Qt-759da9b325f19670a3d79ede5f06fb3fa1f95495.tar.gz Qt-759da9b325f19670a3d79ede5f06fb3fa1f95495.tar.bz2 |
Allow objectName to be used in QML bindings
Task-number: QTBUG-13999
Diffstat (limited to 'src/declarative/qml/qdeclarativedata_p.h')
-rw-r--r-- | src/declarative/qml/qdeclarativedata_p.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativedata_p.h b/src/declarative/qml/qdeclarativedata_p.h index c7857b7..def4188 100644 --- a/src/declarative/qml/qdeclarativedata_p.h +++ b/src/declarative/qml/qdeclarativedata_p.h @@ -64,6 +64,7 @@ class QDeclarativeAbstractBinding; class QDeclarativeContext; class QDeclarativePropertyCache; class QDeclarativeContextData; +class QDeclarativeNotifier; // This class is structured in such a way, that simply zero'ing it is the // default state for elemental object allocations. This is crucial in the // workings of the QDeclarativeInstruction::CreateSimpleObject instruction. @@ -75,7 +76,7 @@ public: : ownMemory(true), ownContext(false), indestructible(true), explicitIndestructibleSet(false), context(0), outerContext(0), bindings(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0), bindingBits(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0), - attachedProperties(0), scriptValue(0), objectDataRefCount(0), propertyCache(0), guards(0) { + scriptValue(0), objectDataRefCount(0), propertyCache(0), guards(0), extendedData(0) { init(); } @@ -91,6 +92,7 @@ public: void destroyed(QObject *); void parentChanged(QObject *, QObject *); + void objectNameChanged(QObject *); void setImplicitDestructible() { if (!explicitIndestructibleSet) indestructible = false; @@ -125,8 +127,6 @@ public: QDeclarativeCompiledData *deferredComponent; // Can't this be found from the context? unsigned int deferredIdx; - QHash<int, QObject *> *attachedProperties; - // ### Can we make this QScriptValuePrivate so we incur no additional allocation // cost? QScriptValue *scriptValue; @@ -149,6 +149,18 @@ public: return 0; } } + + QDeclarativeNotifier *objectNameNotifier() const; + QHash<int, QObject *> *attachedProperties() const; + + struct ExtendedData { + ExtendedData(); + ~ExtendedData(); + + QHash<int, QObject *> attachedProperties; + void *objectNameNotifier; + }; + mutable ExtendedData *extendedData; }; template<class T> |