diff options
author | David Boddie <david.boddie@nokia.com> | 2011-01-17 19:16:50 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-01-17 19:16:50 (GMT) |
commit | 006929de7f84430278e370eaa468a93fa3a1fb96 (patch) | |
tree | e6fdfc64e6efc162585f8f6c01492b4925c46527 /src/declarative/qml/qdeclarativeworkerscript.cpp | |
parent | 72900c3004825514244ebd38f38c0443b9774ad3 (diff) | |
download | Qt-006929de7f84430278e370eaa468a93fa3a1fb96.zip Qt-006929de7f84430278e370eaa468a93fa3a1fb96.tar.gz Qt-006929de7f84430278e370eaa468a93fa3a1fb96.tar.bz2 |
Doc: Fixed invalid/incomplete QML code snippets.
Diffstat (limited to 'src/declarative/qml/qdeclarativeworkerscript.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeworkerscript.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp index ac13c68..6283f92 100644 --- a/src/declarative/qml/qdeclarativeworkerscript.cpp +++ b/src/declarative/qml/qdeclarativeworkerscript.cpp @@ -544,12 +544,7 @@ void QDeclarativeWorkerScriptEngine::run() The above worker script specifies a JavaScript file, "script.js", that handles the operations to be performed in the new thread. Here is \c script.js: - \qml - WorkerScript.onMessage = function(message) { - // ... long-running operations and calculations are done here - WorkerScript.sendMessage({ 'reply': 'Mouse is at ' + message.x + ',' + message.y }) - } - \endqml + \quotefile doc/src/snippets/declarative/script.js When the user clicks anywhere within the rectangle, \c sendMessage() is called, triggering the \tt WorkerScript.onMessage() handler in |