diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2023-09-19 16:43:11 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-09-28 16:23:04 +0200 |
| commit | 4f1b9156a48e44cf1f127a4563d0ac69ab436f12 (patch) | |
| tree | e4092d3574468a0af89efc39145e6fd0348230ae /src/qml/jsruntime/qv4function.cpp | |
| parent | f9271771cf6179a8b51ca90a2f863d6983c8fe0c (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 <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4function.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp index b0d937de90..44e05fbfcc 100644 --- a/src/qml/jsruntime/qv4function.cpp +++ b/src/qml/jsruntime/qv4function.cpp @@ -68,8 +68,8 @@ ReturnedValue Function::call( }); case JsTyped: return QV4::coerceAndCall( - context->engine(), jsTypedFunction, compiledFunction, thisObject, argv, argc, - [this, context](const Value *thisObject, const Value *argv, int argc) { + context->engine(), jsTypedFunction, compiledFunction, argv, argc, + [this, context, thisObject](const Value *argv, int argc) { return doCall(this, thisObject, argv, argc, context); }); default: |
