aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetypewrapper.cpp
diff options
context:
space:
mode:
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) {