aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetypewrapper.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-08-17 10:59:47 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-23 20:50:04 +0200
commit48b4c1f450109b148f03f62574d78b460859c4a1 (patch)
treebbd5f5f2e123444c28179e5886684535c8d09830 /src/qml/qml/qqmlvaluetypewrapper.cpp
parentf7100fbaaceb7c74b164a9130218a197454433cf (diff)
Adapt to qtbase changes
The internal QVariant constructor taking a QMetaTypeId has been removed. Thus, construct QMetaTypes where necessary from the id, or avoid a QMetaType -> ID -> QMetaType roundtrip where we already have a metatype. Also fix a few missing includse that were previously transitively included. Change-Id: I56ce92281d616108a4ff80fe5052b919d1282357 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlvaluetypewrapper.cpp')
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp
index cfd9374b8a..272b8ebfc7 100644
--- a/src/qml/qml/qqmlvaluetypewrapper.cpp
+++ b/src/qml/qml/qqmlvaluetypewrapper.cpp
@@ -122,7 +122,7 @@ void Heap::QQmlValueTypeWrapper::setValue(const QVariant &value) const
QVariant Heap::QQmlValueTypeWrapper::toVariant() const
{
Q_ASSERT(gadgetPtr());
- return QVariant(valueType()->metaType.id(), gadgetPtr());
+ return QVariant(valueType()->metaType, gadgetPtr());
}
@@ -460,7 +460,7 @@ Q_ALWAYS_INLINE static ReturnedValue getGadgetProperty(ExecutionEngine *engine,
if (property->propType() == QMetaType::QVariant) {
args[0] = &v;
} else {
- v = QVariant(property->propType(), static_cast<void *>(nullptr));
+ v = QVariant(QMetaType(property->propType()), static_cast<void *>(nullptr));
args[0] = v.data();
}
metaObject->d.static_metacall(reinterpret_cast<QObject*>(valueTypeWrapper->gadgetPtr()), QMetaObject::ReadProperty,