diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-05-24 21:26:33 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-05-24 21:50:29 +0200 |
commit | 0837453ef90f5d5f569702aa1c7620648dae2c00 (patch) | |
tree | 43a35f937dfcca3f467d4deafe2800d01f0859da /src/qml/qml/qqmlcompileddata.cpp | |
parent | 9ff09fb283cd130fb717769b44f54bfbb28efd8a (diff) | |
parent | 0ba6dffd96a0dda8e3938b09395075c19e46644b (diff) |
Merge remote-tracking branch 'origin/dev' into HEAD
Change-Id: If91e0e28d004f1db978dcab393f189743bb69cd5
Diffstat (limited to 'src/qml/qml/qqmlcompileddata.cpp')
-rw-r--r-- | src/qml/qml/qqmlcompileddata.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/qml/qml/qqmlcompileddata.cpp b/src/qml/qml/qqmlcompileddata.cpp index 28d599a593..1037b5da51 100644 --- a/src/qml/qml/qqmlcompileddata.cpp +++ b/src/qml/qml/qqmlcompileddata.cpp @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE QQmlCompiledData::QQmlCompiledData(QQmlEngine *engine) : engine(engine), importCache(0), metaTypeId(-1), listMetaTypeId(-1), isRegisteredWithEngine(false), - rootPropertyCache(0), totalBindingsCount(0), totalParserStatusCount(0) + totalBindingsCount(0), totalParserStatusCount(0) { Q_ASSERT(engine); } @@ -86,18 +86,15 @@ QQmlCompiledData::~QQmlCompiledData() qDeleteAll(resolvedTypes); resolvedTypes.clear(); - for (int ii = 0; ii < propertyCaches.count(); ++ii) - if (propertyCaches.at(ii)) - propertyCaches.at(ii)->release(); - for (int ii = 0; ii < scripts.count(); ++ii) scripts.at(ii)->release(); if (importCache) importCache->release(); - if (rootPropertyCache) - rootPropertyCache->release(); + for (int ii = 0; ii < propertyCaches.count(); ++ii) + if (propertyCaches.at(ii).data()) + propertyCaches.at(ii)->release(); } void QQmlCompiledData::clear() @@ -112,7 +109,7 @@ QQmlPropertyCache *QQmlCompiledData::TypeReference::propertyCache() const if (type) return typePropertyCache; else - return component->rootPropertyCache; + return component->rootPropertyCache(); } /*! @@ -127,7 +124,7 @@ QQmlPropertyCache *QQmlCompiledData::TypeReference::createPropertyCache(QQmlEngi typePropertyCache->addref(); return typePropertyCache; } else { - return component->rootPropertyCache; + return component->rootPropertyCache(); } } @@ -149,7 +146,7 @@ void QQmlCompiledData::TypeReference::doDynamicTypeCheck() else if (type) mo = type->metaObject(); else if (component) - mo = component->rootPropertyCache->firstCppMetaObject(); + mo = component->rootPropertyCache()->firstCppMetaObject(); isFullyDynamicType = qtTypeInherits<QQmlPropertyMap>(mo); } |