summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlworkerscript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlworkerscript.cpp')
-rw-r--r--src/declarative/qml/qmlworkerscript.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlworkerscript.cpp b/src/declarative/qml/qmlworkerscript.cpp
index 2a3dbce..45bb535 100644
--- a/src/declarative/qml/qmlworkerscript.cpp
+++ b/src/declarative/qml/qmlworkerscript.cpp
@@ -101,9 +101,9 @@ class QmlWorkerScriptEnginePrivate : public QObject
public:
QmlWorkerScriptEnginePrivate();
- struct ScriptEngine : public QScriptEngine
+ struct ScriptEngine : public QmlScriptEngine
{
- ScriptEngine(QmlWorkerScriptEnginePrivate *parent) : p(parent) {}
+ ScriptEngine(QmlWorkerScriptEnginePrivate *parent) : QmlScriptEngine(0), p(parent) {}
QmlWorkerScriptEnginePrivate *p;
};
ScriptEngine *workerEngine;
@@ -259,6 +259,7 @@ void QmlWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url)
QScriptContext *ctxt = workerEngine->pushContext();
ctxt->setActivationObject(activation);
+ workerEngine->baseUrl = url;
workerEngine->evaluate(script);
workerEngine->popContext();