summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativedeclarativedata_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-15 05:58:35 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-17 00:20:49 (GMT)
commit26cd94ef47ffc969dc835e98b58eded14e669964 (patch)
tree9ec8e418ec0ce385bd07289d5368e221a5ce017e /src/declarative/qml/qdeclarativedeclarativedata_p.h
parent06766918436dc6c5de2e605e7ed3421c548c6782 (diff)
downloadQt-26cd94ef47ffc969dc835e98b58eded14e669964.zip
Qt-26cd94ef47ffc969dc835e98b58eded14e669964.tar.gz
Qt-26cd94ef47ffc969dc835e98b58eded14e669964.tar.bz2
Optimization: Reduce unnecessary QObject allocations
Diffstat (limited to 'src/declarative/qml/qdeclarativedeclarativedata_p.h')
-rw-r--r--src/declarative/qml/qdeclarativedeclarativedata_p.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/declarative/qml/qdeclarativedeclarativedata_p.h b/src/declarative/qml/qdeclarativedeclarativedata_p.h
index f962986..d1d063a 100644
--- a/src/declarative/qml/qdeclarativedeclarativedata_p.h
+++ b/src/declarative/qml/qdeclarativedeclarativedata_p.h
@@ -63,13 +63,14 @@ class QDeclarativeCompiledData;
class QDeclarativeAbstractBinding;
class QDeclarativeContext;
class QDeclarativePropertyCache;
+class QDeclarativeContextData;
class Q_AUTOTEST_EXPORT QDeclarativeDeclarativeData : public QDeclarativeData
{
public:
- QDeclarativeDeclarativeData(QDeclarativeContext *ctxt = 0)
- : ownMemory(true), 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),
+ QDeclarativeDeclarativeData()
+ : 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), propertyCache(0), guards(0) {}
virtual void destroyed(QObject *);
@@ -80,11 +81,14 @@ public:
}
quint32 ownMemory:1;
+ quint32 ownContext:1;
quint32 indestructible:1;
quint32 explicitIndestructibleSet:1;
- quint32 dummy:29;
+ quint32 dummy:28;
+
+ QDeclarativeContextData *context;
+ QDeclarativeContextData *outerContext;
- QDeclarativeContext *context;
QDeclarativeAbstractBinding *bindings;
// Linked list for QDeclarativeContext::contextObjects
@@ -97,7 +101,6 @@ public:
void clearBindingBit(int);
void setBindingBit(QObject *obj, int);
- QDeclarativeContext *outerContext; // Can't this be found from context?
ushort lineNumber;
ushort columnNumber;