diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2016-05-29 09:33:26 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-05-31 06:55:02 +0000 |
commit | 3241573e1a72f2829d1339cd5bbe62f30d93c37f (patch) | |
tree | 1d97a226af23f8a92591a4cbdb97a2dfc7b941e2 /src/qml/qml/qqmlcompileddata.cpp | |
parent | 7dc5cd942eb5c55a26d539eedff48b2d6c8e0fc3 (diff) |
Move property caches from QQmlCompiledData to QV4::CompiledData::CompilationUnit
This makes particularly sense as the binding property data per object that
allows us to avoid a by-name property lookup when instantiating types is also
stored there.
Change-Id: I4d9275c1d8fde252df83eb11a9dfea71e5e9583a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlcompileddata.cpp')
-rw-r--r-- | src/qml/qml/qqmlcompileddata.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlcompileddata.cpp b/src/qml/qml/qqmlcompileddata.cpp index 1037b5da51..0305f3605f 100644 --- a/src/qml/qml/qqmlcompileddata.cpp +++ b/src/qml/qml/qqmlcompileddata.cpp @@ -91,10 +91,6 @@ QQmlCompiledData::~QQmlCompiledData() if (importCache) importCache->release(); - - for (int ii = 0; ii < propertyCaches.count(); ++ii) - if (propertyCaches.at(ii).data()) - propertyCaches.at(ii)->release(); } void QQmlCompiledData::clear() @@ -109,7 +105,7 @@ QQmlPropertyCache *QQmlCompiledData::TypeReference::propertyCache() const if (type) return typePropertyCache; else - return component->rootPropertyCache(); + return component->compilationUnit->rootPropertyCache(); } /*! @@ -124,7 +120,7 @@ QQmlPropertyCache *QQmlCompiledData::TypeReference::createPropertyCache(QQmlEngi typePropertyCache->addref(); return typePropertyCache; } else { - return component->rootPropertyCache(); + return component->compilationUnit->rootPropertyCache(); } } @@ -146,7 +142,7 @@ void QQmlCompiledData::TypeReference::doDynamicTypeCheck() else if (type) mo = type->metaObject(); else if (component) - mo = component->rootPropertyCache()->firstCppMetaObject(); + mo = component->compilationUnit->rootPropertyCache()->firstCppMetaObject(); isFullyDynamicType = qtTypeInherits<QQmlPropertyMap>(mo); } |