aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qquicklistmodel/data/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qquicklistmodel/data/script.js')
-rw-r--r--tests/auto/qml/qquicklistmodel/data/script.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qquicklistmodel/data/script.js b/tests/auto/qml/qquicklistmodel/data/script.js
new file mode 100644
index 0000000000..66a4acb8a8
--- /dev/null
+++ b/tests/auto/qml/qquicklistmodel/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})
+}
+
+