From 8ac705247430ff6fbbc25a9db20c0e7dc572abe7 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Tue, 25 May 2021 10:45:51 +0200 Subject: Revert "Do QMetaType-style call in QQmlPropertyBinding::evaluate" This reverts commit 3a4e013f0058952c94ed3414aafbf96216efff8d. The patch seems to break the tests in QtPositioning (see QTBUG-93983 for some more details) Task-number: QTBUG-93983 Change-Id: Ie2caa8418f06add1c24d9f3d3d137e51e94908c2 Reviewed-by: Fabian Kosmale --- src/qml/jsruntime/qv4jscall_p.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/qml/jsruntime/qv4jscall_p.h') diff --git a/src/qml/jsruntime/qv4jscall_p.h b/src/qml/jsruntime/qv4jscall_p.h index c6d320ac20..3f0c8ee06d 100644 --- a/src/qml/jsruntime/qv4jscall_p.h +++ b/src/qml/jsruntime/qv4jscall_p.h @@ -206,7 +206,7 @@ ReturnedValue convertAndCall( } template -bool convertAndCall(ExecutionEngine *engine, const Value *thisObject, +void convertAndCall(ExecutionEngine *engine, const Value *thisObject, void **a, const QMetaType *types, int argc, Callable call) { Scope scope(engine); @@ -215,10 +215,13 @@ bool convertAndCall(ExecutionEngine *engine, const Value *thisObject, for (int ii = 0; ii < argc; ++ii) jsCallData.args[ii] = engine->metaTypeToJS(types[ii + 1], a[ii + 1]); - ScopedValue jsResult(scope, call(thisObject, jsCallData.args, argc)); void *result = a[0]; - if (!result) - return !jsResult->isUndefined(); + if (!result) { + call(thisObject, jsCallData.args, argc); + return; + } + + ScopedValue jsResult(scope, call(thisObject, jsCallData.args, argc)); const QMetaType resultType = types[0]; if (scope.hasException()) { @@ -234,7 +237,6 @@ bool convertAndCall(ExecutionEngine *engine, const Value *thisObject, scope.engine->metaTypeFromJS(jsResult, resultType, result); } } - return !jsResult->isUndefined(); } } -- cgit v1.2.3