aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qquickworkerscript.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-12-05 10:45:14 +0100
committerLars Knoll <lars.knoll@qt.io>2018-01-12 07:04:27 +0000
commit4e1512baf6d1220c9e89c8a36f16de400bb1b519 (patch)
treea4edebfeeebfd19e0aba8e376ddf593783f05100 /src/qml/types/qquickworkerscript.cpp
parent4d6830546619d16275b01f1f049fdcb0b6489f7a (diff)
Convert more builtin functions to use the new calling convention
Convert most of the methods used QML objects to the new calling convention. Converted IndexedBuiltinFunction to do the same. Change-Id: I41b26042c2f56f24988485b06e8ccd214e2573c0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/types/qquickworkerscript.cpp')
-rw-r--r--src/qml/types/qquickworkerscript.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp
index 346f2e6a61..43ba21afad 100644
--- a/src/qml/types/qquickworkerscript.cpp
+++ b/src/qml/types/qquickworkerscript.cpp
@@ -186,7 +186,7 @@ public:
int m_nextId;
- static QV4::ReturnedValue method_sendMessage(const QV4::BuiltinFunction *, QV4::CallData *callData);
+ static QV4::ReturnedValue method_sendMessage(const QV4::FunctionObject *, const QV4::Value *thisObject, const QV4::Value *argv, int argc);
signals:
void stopThread();
@@ -293,15 +293,15 @@ QQuickWorkerScriptEnginePrivate::QQuickWorkerScriptEnginePrivate(QQmlEngine *eng
{
}
-QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::method_sendMessage(const QV4::BuiltinFunction *b,
- QV4::CallData *callData)
+QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::method_sendMessage(const QV4::FunctionObject *b,
+ const QV4::Value *, const QV4::Value *argv, int argc)
{
QV4::Scope scope(b);
- WorkerEngine *engine = (WorkerEngine*)scope.engine->v8Engine;
+ WorkerEngine *engine = static_cast<WorkerEngine *>(scope.engine->v8Engine);
- int id = callData->argc() > 1 ? callData->args[1].toInt32() : 0;
+ int id = argc > 1 ? argv[1].toInt32() : 0;
- QV4::ScopedValue v(scope, callData->argument(2));
+ QV4::ScopedValue v(scope, argc > 2 ? argv[2] : QV4::Primitive::undefinedValue());
QByteArray data = QV4::Serialize::serialize(v, scope.engine);
QMutexLocker locker(&engine->p->m_lock);