aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-09-23 15:28:13 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-25 13:13:30 +0200
commitcefcba03d734a774a3fe25fa3c3d8fea669473e3 (patch)
treeebb8b0dbde58b14ecaed768b901f2a18878633dc /src
parent443f99eafb2337f23272f02b1e4c28d9e8310c67 (diff)
Fix assigning composite type object literals to object properties
When doing the assignability test, pick the property cache from our property caches for the created sub object and only otherwise fall back to the regular engine cache. Change-Id: I07b9746335a9a169e1055a3f4dc7fd3f0ab0fdef Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index b137d31dbb..c69906ecb9 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -1161,7 +1161,9 @@ bool QmlObjectCreator::setPropertyValue(QQmlPropertyData *property, int bindingI
bool isAssignable = false;
// Determine isAssignable value
if (propertyMetaObject) {
- QQmlPropertyCache *c = enginePrivate->cache(createdSubObject);
+ QQmlPropertyCache *c = propertyCaches.value(binding->value.objectIndex);
+ if (!c)
+ c = enginePrivate->cache(createdSubObject);
while (c && !isAssignable) {
isAssignable |= c == propertyMetaObject;
c = c->parent();