aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-30 08:38:55 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-30 18:21:48 +0200
commit5b6687b7d94eb8ad140a2c150d3c978fe4d0af17 (patch)
treedcdf10415e5dee20e2b854d62aa78674533894c1 /src/qml/qml
parent385890bfdb165b397b29d3b62099f0687b358510 (diff)
Improve component boundary detect in new compiler
Instead of going through the property cache and the potential creation of a dynamic meta object to determine inequality with QQmlComponent::staticMetaObject, we can simply use the QQmlType and its know metaObject directly to perform the check. That's faster and more reliably. Change-Id: If6484b059ec2bed234009755adf2fa3aa19b2b9f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 8cc0246153..1882d359ff 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -1430,9 +1430,10 @@ bool QQmlComponentAndAliasResolver::resolve()
if (stringAt(obj->inheritedTypeNameIndex).isEmpty())
continue;
- QQmlRefPointer<QQmlPropertyCache> cache = propertyCaches.value(i);
- if (!cache || isComponentType(obj->inheritedTypeNameIndex)
- || cache->metaObject() != &QQmlComponent::staticMetaObject)
+ QQmlCompiledData::TypeReference tref = resolvedTypes.value(obj->inheritedTypeNameIndex);
+ if (!tref.type)
+ continue;
+ if (tref.type->metaObject() != &QQmlComponent::staticMetaObject)
continue;
componentRoots.append(i);