diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-18 01:00:17 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-18 08:01:45 +0200 |
commit | 934f25028a232c9bccdb842f53fa67959cc8dffc (patch) | |
tree | a78fef6197d63feab3194eb7f4cd2e10934b18ee /src/qml/compiler/qqmlpropertyvalidator.cpp | |
parent | f8e90c61c5da4ca5e0aec24d42b2962877289ab2 (diff) | |
parent | 2bdbf216fe7b6cf9d404b80ac405bd3969f5c07f (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/qml/qml/qqmlimport.cpp
Change-Id: I6add6267297ea50a646d43d212027a168dca8916
Diffstat (limited to 'src/qml/compiler/qqmlpropertyvalidator.cpp')
-rw-r--r-- | src/qml/compiler/qqmlpropertyvalidator.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlpropertyvalidator.cpp b/src/qml/compiler/qqmlpropertyvalidator.cpp index 4714f505a7..8c06760d42 100644 --- a/src/qml/compiler/qqmlpropertyvalidator.cpp +++ b/src/qml/compiler/qqmlpropertyvalidator.cpp @@ -693,7 +693,10 @@ QQmlCompileError QQmlPropertyValidator::validateObjectBinding(QQmlPropertyData * } else if (binding->flags & QV4::CompiledData::Binding::IsSignalHandlerObject && property->isFunction()) { return noError; } else if (QQmlValueTypeFactory::isValueType(property->propType())) { - return QQmlCompileError(binding->location, tr("Unexpected object assignment for property \"%1\"").arg(propertyName)); + auto typeName = QMetaType::typeName(property->propType()); + return QQmlCompileError(binding->location, tr("Can not assign value of type \"%1\" to property \"%2\", expecting an object") + .arg(typeName ? QString::fromLatin1(typeName) : QString::fromLatin1("<unknown type>")) + .arg(propertyName)); } else if (property->propType() == qMetaTypeId<QQmlScriptString>()) { return QQmlCompileError(binding->valueLocation, tr("Invalid property assignment: script expected")); } else { |