diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-01-08 14:03:06 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-01-13 16:03:59 +0100 |
commit | 2996fb835962750845702db4a9ded257f3f1a9b0 (patch) | |
tree | b43a3aa62128ee22eb29715c9db6892db5be3381 /src/qml/jsruntime | |
parent | c225e23e00bc539daefa357f687fe4a1b51ade9f (diff) |
QtQml: Move property caches into base CU
Change-Id: I1567c9d3d61312e98200fb0854d7fcf111983948
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r-- | src/qml/jsruntime/qv4executablecompilationunit.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4executablecompilationunit_p.h | 19 |
2 files changed, 16 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4executablecompilationunit.cpp b/src/qml/jsruntime/qv4executablecompilationunit.cpp index ffd8b787e1..b6eb5298db 100644 --- a/src/qml/jsruntime/qv4executablecompilationunit.cpp +++ b/src/qml/jsruntime/qv4executablecompilationunit.cpp @@ -374,7 +374,7 @@ QQmlRefPointer<ExecutableCompilationUnit> ExecutableCompilationUnit::create( void ExecutableCompilationUnit::finalizeCompositeType(const QQmlType &type) { // Add to type registry of composites - if (propertyCaches.needsVMEMetaObject(/*root object*/0)) { + if (m_compilationUnit->propertyCaches.needsVMEMetaObject(/*root object*/0)) { // qmlType is only valid for types that have references to themselves. if (type.isValid()) { qmlType = type; diff --git a/src/qml/jsruntime/qv4executablecompilationunit_p.h b/src/qml/jsruntime/qv4executablecompilationunit_p.h index d1504079b4..e0365b6fd8 100644 --- a/src/qml/jsruntime/qv4executablecompilationunit_p.h +++ b/src/qml/jsruntime/qv4executablecompilationunit_p.h @@ -78,12 +78,23 @@ public: QUrl url() const { return m_compilationUnit->url(); } QUrl finalUrl() const { return m_compilationUnit->finalUrl(); } - // QML specific fields - QQmlPropertyCacheVector propertyCaches; - QQmlPropertyCache::ConstPtr rootPropertyCache() const { return propertyCaches.at(/*root object*/0); } - QQmlRefPointer<QQmlTypeNameCache> typeNameCache; + const QQmlPropertyCacheVector *propertyCachesPtr() const + { + return &m_compilationUnit->propertyCaches; + } + + QQmlPropertyCacheVector *propertyCachesPtr() + { + return &m_compilationUnit->propertyCaches; + } + + QQmlPropertyCache::ConstPtr rootPropertyCache() const + { + return m_compilationUnit->rootPropertyCache(); + } + // mapping from component object index (CompiledData::Unit object index that points to component) to identifier hash of named objects // this is initialized on-demand by QQmlContextData QHash<int, IdentifierHash> namedObjectsPerComponentCache; |