aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2023-09-19 16:43:11 +0200
committerUlf Hermann <[email protected]>2023-09-28 16:23:04 +0200
commit4f1b9156a48e44cf1f127a4563d0ac69ab436f12 (patch)
treee4092d3574468a0af89efc39145e6fd0348230ae /src/qml/jsruntime/qv4functionobject.cpp
parentf9271771cf6179a8b51ca90a2f863d6983c8fe0c (diff)
QML: Implement QObjectMethod::virtualCallWithMetaTypes
We can use the same mechanism we have in place when calling typed JavaScript functions. The type coercion is generalized and moved to qv4jscall_p.h. We also use the correct JavaScript coercion in the rare fallback case where the types are actually different. Fixes: QTBUG-113258 Change-Id: I30404ee0122433b47227b2fc0dc4b0e3862a99c7 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 45ca75008c..0b11cdfe20 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -545,9 +545,8 @@ ReturnedValue ArrowFunction::virtualCall(const QV4::FunctionObject *fo, const Va
});
case Function::JsTyped:
return QV4::coerceAndCall(
- fo->engine(), function->jsTypedFunction, function->compiledFunction,
- thisObject, argv, argc,
- [fo](const Value *thisObject, const Value *argv, int argc) {
+ fo->engine(), function->jsTypedFunction, function->compiledFunction, argv, argc,
+ [fo, thisObject](const Value *argv, int argc) {
return qfoDoCall(fo, thisObject, argv, argc);
});
default: