summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2014-08-11 13:43:38 +0200
committerIsmo Haataja <ismo.haataja@digia.com>2014-08-26 08:12:44 +0200
commit5d204b2879c8eb1cd98e7713db8a26905fbc6cfd (patch)
tree5e153384c9298d4b1d44fceccd623cf422895003 /src
parentdac411122a9275eac6b94c1cd3ca0c300937cf83 (diff)
downloadqtwebchannel-5d204b2879c8eb1cd98e7713db8a26905fbc6cfd.tar.gz
Get rid of setTimeout calls in qwebchannel.js client code.
This was a historic artefact which should not be required anymore. Back then it was added when trying to improve the perceived performance of the webchannel on an embedded device. Nowadays, using the built-in WebKit IPC mechanism instead of WebSockets, paired with the rest of the code cleanup and other changes, it should not be required anymore. Change-Id: I4b2d76d84aaf92e12592a0b2bcf94710b697846e Reviewed-by: Lutz Schönemann <lutz.schoenemann@basyskom.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/webchannel/qwebchannel.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/webchannel/qwebchannel.js b/src/webchannel/qwebchannel.js
index 2df8704..4b031c0 100644
--- a/src/webchannel/qwebchannel.js
+++ b/src/webchannel/qwebchannel.js
@@ -154,7 +154,7 @@ var QWebChannel = function(transport, initCallback)
console.warn("Unhandled property update: " + data.object + "::" + data.signal);
}
}
- setTimeout(function() { channel.exec({type: QWebChannelMessageTypes.idle}); }, 0);
+ channel.exec({type: QWebChannelMessageTypes.idle});
}
// prevent multiple initialization which might happen with multiple webchannel clients.
@@ -172,7 +172,7 @@ var QWebChannel = function(transport, initCallback)
if (initCallback) {
initCallback(channel);
}
- setTimeout(function() { channel.exec({type: QWebChannelMessageTypes.idle}); }, 0);
+ channel.exec({type: QWebChannelMessageTypes.idle});
}
this.debug = function(message)