aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertyvalidator.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-04-29 09:36:15 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-05-18 20:03:07 +0200
commit3e2d749a5e208a187312d354754990adc41ddfe3 (patch)
treea19810ca163931cdd820cdc21691e0173fbf60d4 /src/qml/qml/qqmlpropertyvalidator.cpp
parent79b742fb84abe699ff726eec548793880cfa7527 (diff)
Make QQmlScriptString an anonymous QML type
It needs to be replaced, but we should at least know that it exists. Change-Id: Ia98a9c3b1670f69d34212b904a320617b8c6501d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertyvalidator.cpp')
-rw-r--r--src/qml/qml/qqmlpropertyvalidator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlpropertyvalidator.cpp b/src/qml/qml/qqmlpropertyvalidator.cpp
index d7afffeaf9..7f7b2038a4 100644
--- a/src/qml/qml/qqmlpropertyvalidator.cpp
+++ b/src/qml/qml/qqmlpropertyvalidator.cpp
@@ -742,11 +742,11 @@ QQmlError QQmlPropertyValidator::validateObjectBinding(QQmlPropertyData *propert
.arg(rhsType())
.arg(propertyName)
.arg(typeName));
+ } else if (propType == qMetaTypeId<QQmlScriptString>()) {
+ return qQmlCompileError(binding->valueLocation, tr("Invalid property assignment: script expected"));
} else if (QQmlValueTypeFactory::isValueType(propType)) {
return qQmlCompileError(binding->location, tr("Cannot assign value of type \"%1\" to property \"%2\", expecting an object")
.arg(rhsType()).arg(propertyName));
- } else if (propType == qMetaTypeId<QQmlScriptString>()) {
- return qQmlCompileError(binding->valueLocation, tr("Invalid property assignment: script expected"));
} else {
// We want to use the raw metaObject here as the raw metaobject is the
// actual property type before we applied any extensions that might