aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcompileddata.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-05-23 15:35:52 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-05-24 14:08:26 +0000
commit0ba6dffd96a0dda8e3938b09395075c19e46644b (patch)
tree0e3dbefa18d82eec2122d109eb9e787103cbc43d /src/qml/qml/qqmlcompileddata.cpp
parenta6814650232825663f33fe4f11a362c397385350 (diff)
Get rid of QQmlCompiledData::rootPropertyCache member
This would not seem like a member variable that is hot enough to keep there and it is two loads away. Change-Id: Id7088771bd33545a2846cc3497e5904dd8ac4f5d Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlcompileddata.cpp')
-rw-r--r--src/qml/qml/qqmlcompileddata.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/qml/qml/qqmlcompileddata.cpp b/src/qml/qml/qqmlcompileddata.cpp
index 0b44972491..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).data())
- 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);
}