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/jsapi/qjsvalue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsapi/qjsvalue.cpp') diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp index 1122700334..a3cf034096 100644 --- a/src/qml/jsapi/qjsvalue.cpp +++ b/src/qml/jsapi/qjsvalue.cpp @@ -579,7 +579,7 @@ QVariant QJSValue::toVariant() const if (val.isUndefined()) return QVariant(); if (val.isNull()) - return QVariant(QMetaType::Nullptr, nullptr); + return QVariant(QMetaType::fromType(), nullptr); if (val.isBoolean()) return QVariant(val.booleanValue()); if (val.isInt32()) // Includes doubles that can be losslessly casted to int -- cgit v1.2.3