aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlworkerscript
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlworkerscript')
-rw-r--r--src/qmlworkerscript/qquickworkerscript.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qmlworkerscript/qquickworkerscript.cpp b/src/qmlworkerscript/qquickworkerscript.cpp
index 20294d7ba7..705c6015a2 100644
--- a/src/qmlworkerscript/qquickworkerscript.cpp
+++ b/src/qmlworkerscript/qquickworkerscript.cpp
@@ -41,6 +41,7 @@
#include "qquickworkerscript_p.h"
#include <private/qqmlengine_p.h>
#include <private/qqmlexpression_p.h>
+#include <private/qjsvalue_p.h>
#include <QtCore/qcoreevent.h>
#include <QtCore/qcoreapplication.h>
@@ -644,7 +645,8 @@ bool QQuickWorkerScript::event(QEvent *event)
if (QQmlEngine *engine = qmlEngine(this)) {
QV4::ExecutionEngine *v4 = engine->handle();
WorkerDataEvent *workerEvent = static_cast<WorkerDataEvent *>(event);
- emit message(QJSValue(v4, QV4::Serialize::deserialize(workerEvent->data(), v4)));
+ emit message(QJSValuePrivate::fromReturnedValue(
+ QV4::Serialize::deserialize(workerEvent->data(), v4)));
}
return true;
} else if (event->type() == (QEvent::Type)WorkerErrorEvent::WorkerError) {