aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compat
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2024-10-14 14:28:25 +0200
committerUlf Hermann <[email protected]>2024-10-24 14:19:23 +0200
commit72bf9286d759ef7ed9c358536b7f1fd95b6ba851 (patch)
treead304ab8c17ac237b05a15f02cb29a6c4f41eee9 /src/qml/compat
parent5266fc8e43a5bc0e367e6e0efd99a1feb6ac4732 (diff)
QtQml: Call lookups based on enums rather than via function pointers
While the C++ standard says that different functions need to have unique addresses, some compilers have take substantial liberties with that rule. This means we can't actually rely on the addresses of our different lookup functions to differ and therefore we cannot use them as discriminator. Introduce an enumeration for all the different lookups and use that instead. Now we can also drop all the purely redirecting methods we've introduced just to have different addresses. Change-Id: Ifa68c27c0d2fef4084893a19227dab21bd948dfd Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'src/qml/compat')
-rw-r--r--src/qml/compat/removed_api.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compat/removed_api.cpp b/src/qml/compat/removed_api.cpp
index 4b74d15d75..bf58c2be99 100644
--- a/src/qml/compat/removed_api.cpp
+++ b/src/qml/compat/removed_api.cpp
@@ -53,7 +53,7 @@ bool QQmlPrivate::AOTCompiledContext::callObjectPropertyLookup(
QV4::Lookup *lookup = compilationUnit->runtimeLookups + index;
QV4::Scope scope(engine->handle());
QV4::ScopedValue thisObject(scope, QV4::QObjectWrapper::wrap(scope.engine, object));
- QV4::ScopedFunctionObject function(scope, lookup->getter(lookup, engine->handle(), thisObject));
+ QV4::ScopedFunctionObject function(scope, lookup->getter(engine->handle(), thisObject));
if (!function) {
scope.engine->throwTypeError(
QStringLiteral("Property '%1' of object [object Object] is not a function")
@@ -79,7 +79,7 @@ bool QQmlPrivate::AOTCompiledContext::callQmlContextPropertyLookup(
QV4::Scope scope(engine->handle());
QV4::ScopedValue thisObject(scope);
QV4::ScopedFunctionObject function(
- scope, lookup->qmlContextPropertyGetter(lookup, scope.engine, thisObject));
+ scope, lookup->contextGetter(scope.engine, thisObject));
if (!function) {
scope.engine->throwTypeError(
QStringLiteral("Property '%1' of object [null] is not a function").arg(