aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlbinding.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-09-08 12:33:23 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-09-16 08:36:58 +0200
commit0b92a93e8e165520b12cb8ca1d0a8812ed6e046b (patch)
treeabd70e7ce9477a31578d85d499ba69052d2befc5 /src/qml/qml/qqmlbinding.cpp
parent7dab889190b2289a7c4b48e732d7cb7838dbf297 (diff)
Avoid various warnings about deprected QMetaType methods
Change-Id: I8f4b2703fdd08ff341904219cec33c321e0511c7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlbinding.cpp')
-rw-r--r--src/qml/qml/qqmlbinding.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index cdfbad2a35..3253c547ab 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -461,9 +461,8 @@ Q_NEVER_INLINE bool QQmlBinding::slowWrite(const QQmlPropertyData &core,
QVariant::fromValue(QJSValuePrivate::fromReturnedValue(result.asReturnedValue())),
context(), flags);
} else if (isUndefined) {
- const QLatin1String typeName(QMetaType::typeName(type)
- ? QMetaType::typeName(type)
- : "[unknown property type]");
+ const char *name = QMetaType(type).name();
+ const QLatin1String typeName(name ? name : "[unknown property type]");
delayedError()->setErrorDescription(QLatin1String("Unable to assign [undefined] to ")
+ typeName);
return false;
@@ -494,13 +493,13 @@ Q_NEVER_INLINE bool QQmlBinding::slowWrite(const QQmlPropertyData &core,
if (userType == QMetaType::Nullptr || userType == QMetaType::VoidStar)
valueType = "null";
else
- valueType = QMetaType::typeName(userType);
+ valueType = QMetaType(userType).name();
}
if (!valueType)
valueType = "undefined";
if (!propertyType)
- propertyType = QMetaType::typeName(type);
+ propertyType = QMetaType(type).name();
if (!propertyType)
propertyType = "[unknown property type]";