diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-10 15:13:13 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-22 17:21:22 +0000 |
commit | 2a8fe8d59c80b0f3d0dfea9fb2b8526505d03e24 (patch) | |
tree | 80a4021f6a4b9264d7536b7091479470ee1dee34 /src/qml/compiler | |
parent | 1b4d2741f90d3f4daf79940b9c8713dda0fb7f3d (diff) |
QML: Don't accept assignment of Component to properties of other types
This is dangerous and I don't see a reason why we should allow it.
Fixes: QTBUG-72930
Change-Id: I01b9e624b4b80d52c1a847fa6ecd7a6d44614010
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r-- | src/qml/compiler/qqmlpropertyvalidator.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/qml/compiler/qqmlpropertyvalidator.cpp b/src/qml/compiler/qqmlpropertyvalidator.cpp index 3b97e364e1..746f68369f 100644 --- a/src/qml/compiler/qqmlpropertyvalidator.cpp +++ b/src/qml/compiler/qqmlpropertyvalidator.cpp @@ -669,8 +669,6 @@ QQmlCompileError QQmlPropertyValidator::validateObjectBinding(QQmlPropertyData * } } return noError; - } else if (compilationUnit->objectAt(binding->value.objectIndex)->flags & QV4::CompiledData::Object::IsComponent) { - return noError; } else if (binding->flags & QV4::CompiledData::Binding::IsSignalHandlerObject && property->isFunction()) { return noError; } else if (QQmlValueTypeFactory::isValueType(property->propType())) { |