1 | // Copyright (C) 2021 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 | #include "qv4jscall_p.h" |
5 | |
6 | #include <private/qqmlengine_p.h> |
7 | #include <private/qv4qobjectwrapper_p.h> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | /*! \internal |
12 | |
13 | Sets the arguments of JSCallData from type erased \a args based on type |
14 | information provided by \a types |
15 | */ |
16 | void QV4::populateJSCallArguments(ExecutionEngine *v4, JSCallArguments &jsCall, |
17 | int argc, void **args, const QMetaType *types) |
18 | { |
19 | for (int ii = 0; ii < argc; ++ii) |
20 | jsCall.args[ii] = v4->metaTypeToJS(type: types[ii], data: args[ii + 1]); |
21 | } |
22 | |
23 | QT_END_NAMESPACE |
24 | |