| 1 | // Copyright (C) 2023 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #define QT_QML_BUILD_REMOVED_API |
| 5 | |
| 6 | #include "qtqmlglobal.h" |
| 7 | |
| 8 | QT_USE_NAMESPACE |
| 9 | |
| 10 | #if QT_QML_REMOVED_SINCE(6, 5) |
| 11 | |
| 12 | #include <QtQml/qjsengine.h> |
| 13 | |
| 14 | QJSValue QJSEngine::create(int typeId, const void *ptr) |
| 15 | { |
| 16 | QMetaType type(typeId); |
| 17 | return create(type, ptr); |
| 18 | } |
| 19 | |
| 20 | bool QJSEngine::convertV2(const QJSValue &value, int type, void *ptr) |
| 21 | { |
| 22 | return convertV2(value, metaType: QMetaType(type), ptr); |
| 23 | } |
| 24 | |
| 25 | #endif |
| 26 | |
| 27 | #if QT_QML_REMOVED_SINCE(6, 6) |
| 28 | #include <QtQml/qqmlprivate.h> |
| 29 | #include <QtQml/private/qv4executablecompilationunit_p.h> |
| 30 | #include <QtQml/private/qv4lookup_p.h> |
| 31 | |
| 32 | bool QQmlPrivate::AOTCompiledContext::getEnumLookup(uint index, int *target) const |
| 33 | { |
| 34 | using namespace QQmlPrivate; |
| 35 | QV4::Lookup *l = compilationUnit->runtimeLookups + index; |
| 36 | auto mt = QMetaType(l->qmlEnumValueLookup.metaType); |
| 37 | QVariant buffer(mt); |
| 38 | getEnumLookup(index, target: buffer.data()); |
| 39 | *target = buffer.toInt(); |
| 40 | return true; |
| 41 | } |
| 42 | #endif |
| 43 | |