diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-10-20 16:54:10 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-07 09:00:44 +0000 |
commit | bc5ff76e5afe6356bebb344c9a5d8b304e852f3c (patch) | |
tree | 436e4cfdcad3ec2e882c300c85395fdeee3a4d48 /src/qml/types/qquickworkerscript.cpp | |
parent | 9b25000cb41b97c9c9f49a542c9b82cf25c032db (diff) |
Simplify JSCallData construction
Change-Id: Ic53532edae9a209aa7125af6f00a9d993d74f1a3
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/types/qquickworkerscript.cpp')
-rw-r--r-- | src/qml/types/qquickworkerscript.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<QV4::QmlContext> 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; |