aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qquicklistmodel/data/workersync.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qquicklistmodel/data/workersync.js')
-rw-r--r--tests/auto/qml/qquicklistmodel/data/workersync.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qml/qquicklistmodel/data/workersync.js b/tests/auto/qml/qquicklistmodel/data/workersync.js
new file mode 100644
index 0000000000..9b8d8fa7f3
--- /dev/null
+++ b/tests/auto/qml/qquicklistmodel/data/workersync.js
@@ -0,0 +1,8 @@
+WorkerScript.onMessage = function(msg) {
+ if (msg.action == 'addItem') {
+ msg.model.get(0).level0.append({ 'level1': 33 });
+ } else if (msg.action == 'dosync') {
+ msg.model.sync();
+ }
+ WorkerScript.sendMessage({'done': true})
+}