From 48b4c1f450109b148f03f62574d78b460859c4a1 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Mon, 17 Aug 2020 10:59:47 +0200 Subject: 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 --- src/qml/qml/qqmlproperty.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/qml/qqmlproperty.cpp') diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp index 5a2c87f221..0de097e81e 100644 --- a/src/qml/qml/qqmlproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -1088,12 +1088,12 @@ QVariant QQmlPropertyPrivate::readValueProperty() if (core.propType() == QMetaType::QVariant) { args[0] = &value; } else { - value = QVariant(core.propType(), (void*)nullptr); + value = QVariant(QMetaType(core.propType()), (void*)nullptr); args[0] = value.data(); } core.readPropertyWithArgs(object, args); if (core.propType() != QMetaType::QVariant && args[0] != value.data()) - return QVariant((QVariant::Type)core.propType(), args[0]); + return QVariant(QMetaType(core.propType()), args[0]); return value; } @@ -1244,7 +1244,7 @@ bool QQmlPropertyPrivate::write( // This reflects the fact that you can assign a nullptr to a QObject pointer // Without the change to QObjectStar, rawMetaObjectForType would not give us a QQmlMetaObject varType = QMetaType::QObjectStar; - val = QVariant(QMetaType::QObjectStar, nullptr); + val = QVariant(QMetaType::fromType(), nullptr); } QQmlMetaObject valMo = rawMetaObjectForType(enginePriv, varType); if (valMo.isNull()) -- cgit v1.2.3