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>
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);