From bc5ff76e5afe6356bebb344c9a5d8b304e852f3c Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 20 Oct 2017 16:54:10 +0200 Subject: Simplify JSCallData construction Change-Id: Ic53532edae9a209aa7125af6f00a9d993d74f1a3 Reviewed-by: Erik Verbruggen --- src/qml/types/qquickworkerscript.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/types') diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp index 64949ef5ae..6db1372465 100644 --- a/src/qml/types/qquickworkerscript.cpp +++ b/src/qml/types/qquickworkerscript.cpp @@ -248,7 +248,7 @@ void QQuickWorkerScriptEnginePrivate::WorkerEngine::init() QV4::ScopedString name(scope, m_v4Engine->newString(QStringLiteral("sendMessage"))); QV4::ScopedValue function(scope, QV4::BuiltinFunction::create(globalContext, name, QQuickWorkerScriptEnginePrivate::method_sendMessage)); - QV4::JSCallData jsCallData(scope, createsendconstructor, 1); + QV4::JSCallData jsCallData(scope, 1); jsCallData->args[0] = function; jsCallData->thisObject = global(); createsend.set(scope.engine, createsendconstructor->call(jsCallData)); @@ -265,7 +265,7 @@ QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::WorkerEngine::sendFunction(i QV4::ScopedFunctionObject f(scope, createsend.value()); QV4::ScopedValue v(scope); - QV4::JSCallData jsCallData(scope, f, 1); + QV4::JSCallData jsCallData(scope, 1); jsCallData->args[0] = QV4::Primitive::fromInt32(id); jsCallData->thisObject = global(); v = f->call(jsCallData); @@ -366,7 +366,7 @@ void QQuickWorkerScriptEnginePrivate::processMessage(int id, const QByteArray &d QV4::Scoped qmlContext(scope, script->qmlContext.value()); Q_ASSERT(!!qmlContext); - QV4::JSCallData jsCallData(scope, f, 2); + QV4::JSCallData jsCallData(scope, 2); jsCallData->thisObject = workerEngine->global(); jsCallData->args[0] = qmlContext->d()->qml(); // ### jsCallData->args[1] = value; -- cgit v1.2.3