aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4jscall_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-09-13 14:57:47 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-09-20 08:54:42 +0200
commita2db40e6c070017960b9f815c66cab354e3466dc (patch)
treee549b977fb738cd0092d801d54025c0cff79414c /src/qml/jsruntime/qv4jscall_p.h
parent85ba26c64488b76bf7fac37bc001d9762188009a (diff)
V4: Make ExecutionEngine::toVariant() static
Wherever we need an engine in there, we also have a managed value to get it from. This relieves us from the requirement to drag an engine around wherever we want to call toVariant(). Change-Id: Ib95d02b5fbf5eaa494214e337c9b700e97e5e0df Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4jscall_p.h')
-rw-r--r--src/qml/jsruntime/qv4jscall_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4jscall_p.h b/src/qml/jsruntime/qv4jscall_p.h
index 327b5bb510..cf62f2549e 100644
--- a/src/qml/jsruntime/qv4jscall_p.h
+++ b/src/qml/jsruntime/qv4jscall_p.h
@@ -207,7 +207,7 @@ bool convertAndCall(ExecutionEngine *engine, QObject *thisObject,
// When the return type is QVariant, JS objects are to be returned as
// QJSValue wrapped in QVariant. metaTypeFromJS unwraps them, unfortunately.
if (resultType == QMetaType::fromType<QVariant>()) {
- new (result) QVariant(scope.engine->toVariant(jsResult, QMetaType {}));
+ new (result) QVariant(ExecutionEngine::toVariant(jsResult, QMetaType {}));
} else {
resultType.construct(result);
ExecutionEngine::metaTypeFromJS(jsResult, resultType, result);