summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeworkerscript.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2011-02-15 16:10:20 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2011-02-15 16:10:20 (GMT)
commit96abeb8021c48f9651b6a5c62b7cb427b2bc8ccf (patch)
tree69a2ed4ce05b1839d6e050668273c70245076d68 /src/declarative/qml/qdeclarativeworkerscript.cpp
parenta38a14b9fb411231443e80cf14d397492f3412dc (diff)
parent0a24d2d6269d509e775f7da91c8002eddc2dcbd7 (diff)
downloadQt-96abeb8021c48f9651b6a5c62b7cb427b2bc8ccf.zip
Qt-96abeb8021c48f9651b6a5c62b7cb427b2bc8ccf.tar.gz
Qt-96abeb8021c48f9651b6a5c62b7cb427b2bc8ccf.tar.bz2
Merge branch 'master-upstream'
Diffstat (limited to 'src/declarative/qml/qdeclarativeworkerscript.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
index a3a32e9..6cd99e2 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