From 3f86278a77cf4918a2698aae317a9766d9b63505 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C4=99drzej=20Nowacki?= Date: Tue, 20 Nov 2012 15:32:37 +0100 Subject: [PATCH] Document importing issues in worker script Task-number: QTBUG-27454 Change-Id: Ia9f384ab92fe0c55d3299d32a3f7faba1446ce35 Reviewed-by: Alan Alpert (RIM) --- src/qml/doc/src/javascript/imports.qdoc | 1 + src/qml/qml/qquickworkerscript.cpp | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/qml/doc/src/javascript/imports.qdoc b/src/qml/doc/src/javascript/imports.qdoc index eea286d..8e19a9b 100644 --- a/src/qml/doc/src/javascript/imports.qdoc +++ b/src/qml/doc/src/javascript/imports.qdoc @@ -117,6 +117,7 @@ For example: In particular, this may be useful in order to access functionality provided via a singleton type; see qmlRegisterSingletonType() for more information. +\note The .import syntax doesn't work for scripts used in the \l {WorkerScript} \section1 Including a JavaScript Resource from Another JavaScript Resource diff --git a/src/qml/qml/qquickworkerscript.cpp b/src/qml/qml/qquickworkerscript.cpp index 40f07bf..2d5a071 100644 --- a/src/qml/qml/qquickworkerscript.cpp +++ b/src/qml/qml/qquickworkerscript.cpp @@ -600,6 +600,8 @@ void QQuickWorkerScriptEngine::run() Additionally, there are restrictions on the types of values that can be passed to and from the worker script. See the sendMessage() documentation for details. + Worker script can not use \l {qtqml-javascript-imports.html}{.import} syntax. + \sa {declarative/threading/workerscript}{WorkerScript example}, {declarative/threading/threadedlistmodel}{Threaded ListModel example} */ -- 1.7.2.5