From 1935f13b1d3fb681454bb9be4f029f2b014c309f Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 15 Nov 2022 10:53:36 +0100 Subject: [PATCH] QJSEngine: Mark convertV2 variant with int parameter as BC-only We won't need it anymore in Qt7. Change-Id: Iff8bfd5192d80d7603aaa66da8cb00ab23e60f99 Reviewed-by: Fabian Kosmale --- src/qml/jsapi/qjsengine.cpp | 2 ++ src/qml/jsapi/qjsengine.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp index 98df83fd99..c15b5c1ccd 100644 --- a/src/qml/jsapi/qjsengine.cpp +++ b/src/qml/jsapi/qjsengine.cpp @@ -828,10 +828,12 @@ bool QJSEngine::convertManaged(const QJSManagedValue &value, QMetaType type, voi return QV4::ExecutionEngine::metaTypeFromJS(*value.d, type, ptr); } +#if QT_VERSION < QT_VERSION_CHECK(7,0,0) bool QJSEngine::convertV2(const QJSValue &value, int type, void *ptr) { return convertV2(value, QMetaType(type), ptr); } +#endif bool QJSEngine::convertString(const QString &string, QMetaType metaType, void *ptr) { diff --git a/src/qml/jsapi/qjsengine.h b/src/qml/jsapi/qjsengine.h index 1dde093a01..db78e1b9a9 100644 --- a/src/qml/jsapi/qjsengine.h +++ b/src/qml/jsapi/qjsengine.h @@ -212,7 +212,9 @@ private: static bool convertManaged(const QJSManagedValue &value, int type, void *ptr); static bool convertManaged(const QJSManagedValue &value, QMetaType type, void *ptr); - static bool convertV2(const QJSValue &value, int type, void *ptr); +#if QT_VERSION < QT_VERSION_CHECK(7,0,0) + static bool convertV2(const QJSValue &value, int type, void *ptr); // only there for BC reasons +#endif static bool convertV2(const QJSValue &value, QMetaType metaType, void *ptr); static bool convertString(const QString &string, QMetaType metaType, void *ptr);