Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qv4jscall.cpp
Go to the documentation of this file.
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 <QtQml/qqmlinfo.h>
7
8#include <private/qqmlengine_p.h>
9#include <private/qv4qobjectwrapper_p.h>
10
12
19 int argc, void **args, const QMetaType *types)
20{
21 for (int ii = 0; ii < argc; ++ii)
22 jsCall.args[ii] = v4->metaTypeToJS(types[ii], args[ii + 1]);
23}
24
27{
28 auto log = qCritical().nospace().noquote();
29 if (const CppStackFrame *frame = engine->currentStackFrame)
30 log << frame->source() << ':' << frame->lineNumber() << ": ";
31 log << value.toQStringNoThrow()
32 << " should be coerced to void because";
33 switch (problem) {
35 log << " the function called is insufficiently annotated.";
36 break;
37 case InvalidListType:
38 log << " the target type, a list of unknown elements, cannot be resolved.";
39 break;
40 }
41
42 log << " The original value is retained. This will change in a future version of Qt.";
43}
44
45
\inmodule QtCore
Definition qmetatype.h:341
Combined button and popup list for selecting options.
CoercionProblem
@ InvalidListType
@ InsufficientAnnotation
void populateJSCallArguments(ExecutionEngine *v4, JSCallArguments &jsCall, int argc, void **args, const QMetaType *types)
Definition qv4jscall.cpp:18
Q_QML_EXPORT void warnAboutCoercionToVoid(ExecutionEngine *engine, const Value &value, CoercionProblem problem)
Definition qv4jscall.cpp:25
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define qCritical
Definition qlogging.h:167
GLsizei GLenum GLenum * types
QFrame frame
[0]
QJSValueList args
QJSEngine engine
[0]
QV4::ReturnedValue metaTypeToJS(QMetaType type, const void *data)