summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2013-11-13 15:28:38 +0100
committerMilian Wolff <milian.wolff@kdab.com>2013-11-22 17:29:42 +0100
commitd08ec6ff4a6adb47590d657616fe04d007d8ce66 (patch)
tree553d233ba67c9d1e88eed0e9244c4327ba0e5ffa /src
parente8d890b6020e2f2ec2e4ee3b1295963d4dbb1637 (diff)
downloadqtwebchannel-d08ec6ff4a6adb47590d657616fe04d007d8ce66.tar.gz
Add a test for the property update grouping.
For performance reasons, we group property updates and send a single batch update notification. This is now tested to work as intended. This also uncovered a bug in webchannel.js when multiple functions subscribe to the same id. Change-Id: Ic8648d664dd1fe54df7e25fade6a6088386af992 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/webchannel.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/webchannel.js b/src/webchannel.js
index 15ae127..7789d84 100644
--- a/src/webchannel.js
+++ b/src/webchannel.js
@@ -101,7 +101,7 @@ var QWebChannel = function(baseUrl, initCallback)
this.subscribe = function(id, callback)
{
if (channel.subscriptions[id]) {
- channel.subscriptions[id].append(callback);
+ channel.subscriptions[id].push(callback);
} else {
channel.subscriptions[id] = [callback];
}