aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllistmodelworkerscript/data/script.js
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-03-20 09:13:42 +0100
committerSergio Ahumada <sergio.ahumada@digia.com>2013-03-20 09:14:33 +0100
commitd815621963cee5571ed93fb89561c4884a685b6b (patch)
tree4c60b5f69eff56fd324e4203d006e1df677670ce /tests/auto/qml/qqmllistmodelworkerscript/data/script.js
parent9b25a6f39ee59fe1bb4352a5f2e4ef4a91f1f2c3 (diff)
parent471645f6dba6a21b85cb6788f0a0a07b6d5a804a (diff)
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle Change-Id: I6178a580b4c99aded1a69032a02169cff502b71d
Diffstat (limited to 'tests/auto/qml/qqmllistmodelworkerscript/data/script.js')
-rw-r--r--tests/auto/qml/qqmllistmodelworkerscript/data/script.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllistmodelworkerscript/data/script.js b/tests/auto/qml/qqmllistmodelworkerscript/data/script.js
new file mode 100644
index 0000000000..66a4acb8a8
--- /dev/null
+++ b/tests/auto/qml/qqmllistmodelworkerscript/data/script.js
@@ -0,0 +1,13 @@
+WorkerScript.onMessage = function(msg) {
+ var result = null
+ try {
+ for (var i=0; i<msg.commands.length; i++) {
+ var c = 'msg.model.' + msg.commands[i]
+ result = eval(c)
+ }
+ msg.model.sync()
+ } catch(e) { }
+ WorkerScript.sendMessage({'done': true, 'result': result})
+}
+
+