Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
// Qt-Security score:significant
4
5
#
include
"qv4jscall_p.h"
6
7
#
include
<
QtQml
/
qqmlinfo
.
h
>
8
9
#
include
<
private
/
qqmlengine_p
.
h
>
10
#
include
<
private
/
qv4qobjectwrapper_p
.
h
>
11
12
QT_BEGIN_NAMESPACE
13
14
/*! \internal
15
16
Sets the arguments of JSCallData from type erased \a args based on type
17
information provided by \a types
18
*/
19
void
QV4
::populateJSCallArguments(ExecutionEngine *v4,
JSCallArguments
&jsCall,
20
int
argc,
void
**args,
const
QMetaType *types)
21
{
22
for
(
int
ii = 0; ii < argc; ++ii)
23
jsCall.args[ii] = v4->metaTypeToJS(types[ii], args[ii + 1]);
24
}
25
26
void
QV4
::warnAboutCoercionToVoid(
27
ExecutionEngine *engine,
const
Value &value,
CoercionProblem
problem)
28
{
29
auto
log = qCritical().nospace().noquote();
30
if
(
const
CppStackFrame *frame = engine->currentStackFrame)
31
log << frame->source() <<
':'
<< frame->lineNumber() <<
": "
;
32
log << value.toQStringNoThrow()
33
<<
" should be coerced to void because"
;
34
switch
(problem) {
35
case
InsufficientAnnotation
:
36
log <<
" the function called is insufficiently annotated."
;
37
break
;
38
case
InvalidListType
:
39
log <<
" the target type, a list of unknown elements, cannot be resolved."
;
40
break
;
41
}
42
43
log <<
" The original value is retained. This will change in a future version of Qt."
;
44
}
45
46
47
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QV4
Definition
qjsvalue.h:24
QV4::CoercionProblem
CoercionProblem
Definition
qv4jscall_p.h:282
QV4::InvalidListType
@ InvalidListType
Definition
qv4jscall_p.h:284
QV4::InsufficientAnnotation
@ InsufficientAnnotation
Definition
qv4jscall_p.h:283
QV4::JSCallArguments
Definition
qv4jscall_p.h:59
qtdeclarative
src
qml
jsruntime
qv4jscall.cpp
Generated on
for Qt by
1.18.0