aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycachecreator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlpropertycachecreator.cpp')
-rw-r--r--src/qml/qml/qqmlpropertycachecreator.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlpropertycachecreator.cpp b/src/qml/qml/qqmlpropertycachecreator.cpp
index 45edb59cfb..fe68337eb3 100644
--- a/src/qml/qml/qqmlpropertycachecreator.cpp
+++ b/src/qml/qml/qqmlpropertycachecreator.cpp
@@ -115,8 +115,10 @@ bool QQmlBindingInstantiationContext::resolveInstantiatingProperty()
return true;
}
+ if (!referencingObjectPropertyCache)
+ return false;
+
Q_ASSERT(referencingObjectIndex >= 0);
- Q_ASSERT(referencingObjectPropertyCache);
Q_ASSERT(instantiatingBinding->propertyNameIndex != 0);
bool notInRevision = false;
@@ -149,15 +151,22 @@ void QQmlPendingGroupPropertyBindings::resolveMissingPropertyCaches(QQmlEnginePr
if (propertyCaches->at(groupPropertyObjectIndex))
continue;
- if (pendingBinding.referencingObjectPropertyCache) {
- if (!pendingBinding.resolveInstantiatingProperty())
- continue;
- auto cache = pendingBinding.instantiatingPropertyCache(enginePrivate);
- propertyCaches->set(groupPropertyObjectIndex, cache);
- } else {
+ if (pendingBinding.instantiatingPropertyName.isEmpty()) {
+ // Generalized group property.
auto cache = propertyCaches->at(pendingBinding.referencingObjectIndex);
propertyCaches->set(groupPropertyObjectIndex, cache);
+ continue;
}
+
+ if (!pendingBinding.referencingObjectPropertyCache) {
+ pendingBinding.referencingObjectPropertyCache
+ = propertyCaches->at(pendingBinding.referencingObjectIndex);
+ }
+
+ if (!pendingBinding.resolveInstantiatingProperty())
+ continue;
+ auto cache = pendingBinding.instantiatingPropertyCache(enginePrivate);
+ propertyCaches->set(groupPropertyObjectIndex, cache);
}
}