aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmltypecompiler.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-10-21 13:53:43 +0200
committerUlf Hermann <ulf.hermann@digia.com>2014-10-21 16:20:21 +0200
commitdbbb514a084440c05d17e44c7992726d94b26750 (patch)
tree9ce35d09390030143f8d6d21f8562a120715ef5e /src/qml/compiler/qqmltypecompiler.cpp
parent744ba012df4570ad14a07e9ad81a9002b6ab6ff3 (diff)
Check list property before component when validating bindings
There are lists that won't accept a component as element. For example QQuickItem's children will only accept QQuickItems. Task-number: QTBUG-41848 Change-Id: I0fc7b0d1a4770d596caf681be92dff216f48d32b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qqmltypecompiler.cpp')
-rw-r--r--src/qml/compiler/qqmltypecompiler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp
index 6a97386767..3a27a859fd 100644
--- a/src/qml/compiler/qqmltypecompiler.cpp
+++ b/src/qml/compiler/qqmltypecompiler.cpp
@@ -2334,8 +2334,6 @@ bool QQmlPropertyValidator::validateObjectBinding(QQmlPropertyData *property, co
return true;
}
- if (isComponent(binding->value.objectIndex))
- return true;
if (QQmlMetaType::isInterface(property->propType)) {
// Can only check at instantiation time if the created sub-object successfully casts to the
@@ -2354,6 +2352,8 @@ bool QQmlPropertyValidator::validateObjectBinding(QQmlPropertyData *property, co
}
}
return true;
+ } else if (isComponent(binding->value.objectIndex)) {
+ return true;
} else if (binding->flags & QV4::CompiledData::Binding::IsSignalHandlerObject && property->isFunction()) {
return true;
} else if (QQmlValueTypeFactory::isValueType(property->propType)) {