aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-01-31 09:34:26 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-01-31 11:52:53 +0100
commitbb6bc1a06d0348b6b92c39f40e5f8cb1e2fcf67f (patch)
tree28046b62e8ec4aadd4b93313935ceaf2b12de0c4
parent506c74d7827a2199ddf4f9b9e18090ba30e52f1c (diff)
QJSEngine: Move old convertV2 to removed_api.cpp
Pick-to: 6.5 Change-Id: I7f700d64694c8651769841a0109d32e8f9a839b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--src/qml/compat/removed_api.cpp5
-rw-r--r--src/qml/jsapi/qjsengine.cpp7
-rw-r--r--src/qml/jsapi/qjsengine.h2
3 files changed, 6 insertions, 8 deletions
diff --git a/src/qml/compat/removed_api.cpp b/src/qml/compat/removed_api.cpp
index acdd0bab13..00c899d73c 100644
--- a/src/qml/compat/removed_api.cpp
+++ b/src/qml/compat/removed_api.cpp
@@ -17,5 +17,10 @@ QJSValue QJSEngine::create(int typeId, const void *ptr)
return create(type, ptr);
}
+bool QJSEngine::convertV2(const QJSValue &value, int type, void *ptr)
+{
+ return convertV2(value, QMetaType(type), ptr);
+}
+
#endif
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index 04edd7a684..d3a6ed7391 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -848,13 +848,6 @@ 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)
{
// have a string based value without engine. Do conversion manually
diff --git a/src/qml/jsapi/qjsengine.h b/src/qml/jsapi/qjsengine.h
index 9fb56f8cb8..c04e47d34e 100644
--- a/src/qml/jsapi/qjsengine.h
+++ b/src/qml/jsapi/qjsengine.h
@@ -305,7 +305,7 @@ private:
static bool convertPrimitive(const QJSPrimitiveValue &value, QMetaType type, void *ptr);
static bool convertManaged(const QJSManagedValue &value, int type, void *ptr);
static bool convertManaged(const QJSManagedValue &value, QMetaType type, void *ptr);
-#if QT_VERSION < QT_VERSION_CHECK(7,0,0)
+#if QT_QML_REMOVED_SINCE(6, 5)
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);