summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-03-16 03:09:21 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-03-16 06:36:25 (GMT)
commit234a4b614e30ec2ad3e161c0dcd4d339182ff9ec (patch)
tree7b3dc807cda77141bd1e20901249dd2adf92cd98 /src
parent733578aec105c2d2bdb3f6ef57ee3195ebb79696 (diff)
downloadQt-234a4b614e30ec2ad3e161c0dcd4d339182ff9ec.zip
Qt-234a4b614e30ec2ad3e161c0dcd4d339182ff9ec.tar.gz
Qt-234a4b614e30ec2ad3e161c0dcd4d339182ff9ec.tar.bz2
Qt.include() used in WorkerScript is broken on Windows.
The script local filename was used to resolve the source URL rather than the script URL. Change-Id: I78aa23eadbd76e100bb872b6ac9459aa9a5ee5ce Task-number: QTBUG-17977 Reviewed-by: Aaron Kennedy
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qdeclarativescriptparser.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp
index b604706..d9e3ebf 100644
--- a/src/declarative/qml/qdeclarativescriptparser.cpp
+++ b/src/declarative/qml/qdeclarativescriptparser.cpp
@@ -940,7 +940,7 @@ QDeclarativeParser::Object::ScriptBlock::Pragmas QDeclarativeScriptParser::extra
if (l.currentLineNo() == startLine)
return rv;
- if (pragmaValue == QLatin1String("library")) {
+ if (pragmaValue == library) {
rv |= QDeclarativeParser::Object::ScriptBlock::Shared;
replaceWithSpace(script, startOffset, endOffset - startOffset);
} else {
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
index f8d52b5..1ff0caa 100644
--- a/src/declarative/qml/qdeclarativeworkerscript.cpp
+++ b/src/declarative/qml/qdeclarativeworkerscript.cpp
@@ -313,7 +313,7 @@ void QDeclarativeWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url)
QScriptContext *ctxt = QScriptDeclarativeClass::pushCleanContext(workerEngine);
QScriptValue urlContext = workerEngine->newObject();
- urlContext.setData(QScriptValue(workerEngine, fileName));
+ urlContext.setData(QScriptValue(workerEngine, url.toString()));
ctxt->pushScope(urlContext);
ctxt->pushScope(activation);
ctxt->setActivationObject(activation);