aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlscript_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2012-05-11 12:01:41 +0100
committerQt by Nokia <qt-info@nokia.com>2012-05-24 12:52:43 +0200
commitd2e557c2c2d7fcf3bf7c1676df3902e115986dc2 (patch)
tree65f47e443efa9635a2634880c01dc439817f9566 /src/qml/qml/qqmlscript_p.h
parent0a3ff88f851771e52d119fab90c0254de6950585 (diff)
Lazily create QMetaObjects
For internal QML built types, creating a metaobject each time is just wasteful. Additionally, as the property caches were always created from the intermediate QMetaObject, it was difficult to pass information directly from the compiler to the property cache. Change-Id: I769526b0edaaf16a86883f3065b75618b94e4077 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlscript_p.h')
-rw-r--r--src/qml/qml/qqmlscript_p.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/qml/qml/qqmlscript_p.h b/src/qml/qml/qqmlscript_p.h
index daf9fdce14..486c573754 100644
--- a/src/qml/qml/qqmlscript_p.h
+++ b/src/qml/qml/qqmlscript_p.h
@@ -56,7 +56,6 @@
#include <private/qfieldlist_p.h>
#include <private/qhashfield_p.h>
-#include <private/qfastmetabuilder_p.h>
#include <private/qqmlpool_p.h>
#include <private/qqmlpropertycache_p.h>
@@ -320,17 +319,12 @@ public:
// Bit mask of the properties assigned bindings
QByteArray bindingBitmask;
void setBindingBit(int);
- // Returns the metaobject for this type, or 0 if not available.
- // Internally selectd between the metatype and extObject variables
- const QMetaObject *metaObject() const;
- // The compile time metaobject for this type
- const QMetaObject *metatype;
+ QQmlPropertyCache *metatype;
+
// The synthesized metaobject, if QML added signals or properties to
// this type. Otherwise null
- QAbstractDynamicMetaObject extObject;
- QByteArray metadata; // Generated by compiler
- QByteArray synthdata; // Generated by compiler
+ QByteArray synthdata; // Generated by compiler
QQmlPropertyCache *synthCache; // Generated by compiler
Property *getDefaultProperty();
@@ -404,8 +398,7 @@ public:
DynamicProperty *nextProperty;
// Used by the compiler
- QFastMetaBuilder::StringRef nameRef;
- QFastMetaBuilder::StringRef changedNameRef;
+ int nameIndex; // Points at the name and name + "Changed()" strings
};
struct DynamicSignal : public QQmlPool::POD
@@ -420,8 +413,7 @@ public:
DynamicSignal *nextSignal;
// Used by the compiler
- QFastMetaBuilder::StringRef nameRef;
- QQmlPool::List<QFastMetaBuilder::StringRef> parameterNamesRef;
+ int nameIndex;
LocationSpan location;
};
@@ -440,8 +432,7 @@ public:
DynamicSlot *nextSlot;
// Used by the compiler
- QFastMetaBuilder::StringRef nameRef;
- QQmlPool::List<QFastMetaBuilder::StringRef> parameterNamesRef;
+ int nameIndex;
};
// The list of dynamic properties