diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-07-28 17:40:29 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-08-01 15:28:09 +0000 |
commit | fa53d4e35433cc59e99b24f16f18c713683c1a80 (patch) | |
tree | fc49d3b404d806a6000afab52a4ba4db50940a93 /src/qml/compiler/qv4compileddata_p.h | |
parent | 143f22babb43d50dd5ee99f73f04016c84d6171a (diff) |
Cleanup: Move ResolvedTypeReference(Map) one scope up
The class is a candidate for further functionality, it doesn't have
to be nested in CompilationUnit.
Change-Id: I100553160f5ae34f66b9f8ff5df9f636da2ffb67
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index 4153259760..82e303f27d 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -762,6 +762,35 @@ struct TypeReferenceMap : QHash<int, TypeReference> } }; +#ifndef V4_BOOTSTRAP +struct ResolvedTypeReference +{ + ResolvedTypeReference() + : type(0) + , majorVersion(0) + , minorVersion(0) + , isFullyDynamicType(false) + {} + + QQmlType *type; + QQmlRefPointer<QQmlPropertyCache> typePropertyCache; + QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit; + + int majorVersion; + int minorVersion; + // Types such as QQmlPropertyMap can add properties dynamically at run-time and + // therefore cannot have a property cache installed when instantiated. + bool isFullyDynamicType; + + QQmlPropertyCache *propertyCache() const; + QQmlPropertyCache *createPropertyCache(QQmlEngine *); + + void doDynamicTypeCheck(); +}; +// map from name index +typedef QHash<int, ResolvedTypeReference*> ResolvedTypeReferenceMap; +#endif + // index is per-object binding index typedef QVector<QQmlPropertyData*> BindingPropertyData; @@ -823,33 +852,6 @@ struct Q_QML_PRIVATE_EXPORT CompilationUnit : public QQmlRefCount int totalObjectCount; // Number of objects explicitly instantiated QVector<QQmlScriptData *> dependentScripts; - - struct ResolvedTypeReference - { - ResolvedTypeReference() - : type(0) - , majorVersion(0) - , minorVersion(0) - , isFullyDynamicType(false) - {} - - QQmlType *type; - QQmlRefPointer<QQmlPropertyCache> typePropertyCache; - QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit; - - int majorVersion; - int minorVersion; - // Types such as QQmlPropertyMap can add properties dynamically at run-time and - // therefore cannot have a property cache installed when instantiated. - bool isFullyDynamicType; - - QQmlPropertyCache *propertyCache() const; - QQmlPropertyCache *createPropertyCache(QQmlEngine *); - - void doDynamicTypeCheck(); - }; - // map from name index - typedef QHash<int, ResolvedTypeReference*> ResolvedTypeReferenceMap; ResolvedTypeReferenceMap resolvedTypes; int metaTypeId; |