aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compat/removed_api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compat/removed_api.cpp')
-rw-r--r--src/qml/compat/removed_api.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/qml/compat/removed_api.cpp b/src/qml/compat/removed_api.cpp
new file mode 100644
index 0000000000..fe16b7f462
--- /dev/null
+++ b/src/qml/compat/removed_api.cpp
@@ -0,0 +1,42 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#define QT_QML_BUILD_REMOVED_API
+
+#include "qtqmlglobal.h"
+
+QT_USE_NAMESPACE
+
+#if QT_QML_REMOVED_SINCE(6, 5)
+
+#include <QtQml/qjsengine.h>
+
+QJSValue QJSEngine::create(int typeId, const void *ptr)
+{
+ QMetaType type(typeId);
+ return create(type, ptr);
+}
+
+bool QJSEngine::convertV2(const QJSValue &value, int type, void *ptr)
+{
+ return convertV2(value, QMetaType(type), ptr);
+}
+
+#endif
+
+#if QT_QML_REMOVED_SINCE(6, 6)
+#include <QtQml/qqmlprivate.h>
+#include <QtQml/private/qv4executablecompilationunit_p.h>
+#include <QtQml/private/qv4lookup_p.h>
+
+bool QQmlPrivate::AOTCompiledContext::getEnumLookup(uint index, int *target) const
+{
+ using namespace QQmlPrivate;
+ QV4::Lookup *l = compilationUnit->runtimeLookups + index;
+ auto mt = QMetaType(l->qmlEnumValueLookup.metaType);
+ QVariant buffer(mt);
+ getEnumLookup(index, buffer.data());
+ *target = buffer.toInt();
+ return true;
+}
+#endif