diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-05-23 15:20:29 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-05-24 14:08:23 +0000 |
commit | a6814650232825663f33fe4f11a362c397385350 (patch) | |
tree | c11b6b5365b2f0bcce494438257bbf14213a614b /src/qml/qml/qqmlcompiler_p.h | |
parent | 6f4c8ff34526c62995f98c804ab2b7113ff4c6b8 (diff) |
Get rid of QQmlVMEMetaData
It is unused now and we can remove it as well as its QByteArray based storage.
The non-emptyness of the meta-data QByteArray was also used to indicate whether
it is necessary to create a VME meta-object when instantiating an object. This
bit is now folded into the flag of the QFlagPointer storing the property
caches.
Change-Id: I3c3604c61ff16a4e76912e68b1c19afdb0f2bd9d
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlcompiler_p.h')
-rw-r--r-- | src/qml/qml/qqmlcompiler_p.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlcompiler_p.h b/src/qml/qml/qqmlcompiler_p.h index cbe70a7077..42b73fcaf5 100644 --- a/src/qml/qml/qqmlcompiler_p.h +++ b/src/qml/qml/qqmlcompiler_p.h @@ -80,6 +80,10 @@ class QQmlComponent; class QQmlContext; class QQmlContextData; +// The vector is indexed by QV4::CompiledData::Object index and the flag +// indicates whether instantiation of the object requires a VME meta-object. +typedef QVector<QFlagPointer<QQmlPropertyCache>> QQmlPropertyCacheVector; + // ### Merge with QV4::CompiledData::CompilationUnit class Q_AUTOTEST_EXPORT QQmlCompiledData : public QQmlRefCount, public QQmlCleanup { @@ -123,8 +127,7 @@ public: QHash<int, TypeReference*> resolvedTypes; QQmlPropertyCache *rootPropertyCache; - QVector<QByteArray> metaObjects; - QVector<QQmlPropertyCache *> propertyCaches; + QQmlPropertyCacheVector propertyCaches; QList<QQmlScriptData *> scripts; QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit; @@ -139,7 +142,7 @@ public: int totalObjectCount; // Number of objects explicitly instantiated bool isComponent(int objectIndex) const { return objectIndexToIdPerComponent.contains(objectIndex); } - bool isCompositeType() const { return !metaObjects.at(compilationUnit->data->indexOfRootObject).isEmpty(); } + bool isCompositeType() const { return propertyCaches.at(compilationUnit->data->indexOfRootObject).flag(); } bool isInitialized() const { return hasEngine(); } void initialize(QQmlEngine *); |