aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-09-12 14:26:29 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-09-13 22:25:31 +0200
commita429050628c6170d65ea97dfc4508966bb1b15a7 (patch)
treecc508d066849ea5dfd6fddceaa1b20c9518f16dd /src/qml
parentd577b9e42579ad261801b27d11378c235d0502f8 (diff)
Do not call metaTypeFromJS on an object
This is misleading since the method is static. Change-Id: I921906a06575f263a7619cef01698923d1d5e61f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/jsruntime/qv4jscall_p.h4
-rw-r--r--src/qml/qml/qqml.cpp5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4jscall_p.h b/src/qml/jsruntime/qv4jscall_p.h
index 900ff7d2af..327b5bb510 100644
--- a/src/qml/jsruntime/qv4jscall_p.h
+++ b/src/qml/jsruntime/qv4jscall_p.h
@@ -139,7 +139,7 @@ ReturnedValue convertAndCall(
Q_ALLOCA_VAR(void, argument, argumentSize);
argumentType.construct(argument);
if (i < argc)
- engine->metaTypeFromJS(argv[i], argumentType, argument);
+ ExecutionEngine::metaTypeFromJS(argv[i], argumentType, argument);
values[i + 1] = argument;
} else {
values[i + 1] = nullptr;
@@ -210,7 +210,7 @@ bool convertAndCall(ExecutionEngine *engine, QObject *thisObject,
new (result) QVariant(scope.engine->toVariant(jsResult, QMetaType {}));
} else {
resultType.construct(result);
- scope.engine->metaTypeFromJS(jsResult, resultType, result);
+ ExecutionEngine::metaTypeFromJS(jsResult, resultType, result);
}
}
return !jsResult->isUndefined();
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp
index 847522f052..200c2f7b71 100644
--- a/src/qml/qml/qqml.cpp
+++ b/src/qml/qml/qqml.cpp
@@ -1362,9 +1362,8 @@ void AOTCompiledContext::initCallGlobalLookup(uint index) const
bool AOTCompiledContext::loadGlobalLookup(uint index, void *target, QMetaType type) const
{
QV4::Lookup *l = compilationUnit->runtimeLookups + index;
- QV4::ExecutionEngine *v4 = engine->handle();
- if (!v4->metaTypeFromJS(l->globalGetter(l, engine->handle()), type, target)) {
- v4->throwTypeError();
+ if (!QV4::ExecutionEngine::metaTypeFromJS(l->globalGetter(l, engine->handle()), type, target)) {
+ engine->handle()->throwTypeError();
return false;
}
return true;