aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetypewrapper.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/qqmlvaluetypewrapper.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/qqmlvaluetypewrapper.cpp')
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp
index 272b8ebfc7..1bc1674fae 100644
--- a/src/qml/qml/qqmlvaluetypewrapper.cpp
+++ b/src/qml/qml/qqmlvaluetypewrapper.cpp
@@ -238,8 +238,8 @@ bool QQmlValueTypeWrapper::toGadget(void *data) const
if (!ref->readReferenceValue())
return false;
const int typeId = d()->valueType()->metaType.id();
- QMetaType::destruct(typeId, data);
- QMetaType::construct(typeId, data, d()->gadgetPtr());
+ QMetaType(typeId).destruct(data);
+ QMetaType(typeId).construct(data, d()->gadgetPtr());
return true;
}
@@ -407,9 +407,9 @@ ReturnedValue QQmlValueTypeWrapper::method_toString(const FunctionObject *b, con
RETURN_UNDEFINED();
QString result;
- if (!QMetaType::convert(w->d()->gadgetPtr(), w->d()->valueType()->metaType.id(), &result, QMetaType::QString)) {
- result = QString::fromUtf8(QMetaType::typeName(w->d()->valueType()->metaType.id()))
- + QLatin1Char('(');
+ if (!QMetaType::convert(w->d()->valueType()->metaType, w->d()->gadgetPtr(),
+ QMetaType(QMetaType::QString), &result)) {
+ result = QString::fromUtf8(w->d()->valueType()->metaType.name()) + QLatin1Char('(');
const QMetaObject *mo = w->d()->propertyCache()->metaObject();
const int propCount = mo->propertyCount();
for (int i = 0; i < propCount; ++i) {