diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2013-02-15 14:18:30 +0100 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@gmail.com> | 2013-11-01 13:57:47 +0100 |
commit | de3a5ef9f8385acda21bff363f84e6d9236d11f0 (patch) | |
tree | 5be531718c557fd6b440a3f43460ea02bf6e51f7 /src | |
parent | e2b0f3d094123f0e1d76c2f8b7c4dcd13897cb70 (diff) | |
download | qtwebchannel-de3a5ef9f8385acda21bff363f84e6d9236d11f0.tar.gz |
Add a callback for when the QObject integration is setup.
This shows an issue with consecutive signal connections due to some error
in the socket communication. WebSockets should resolve this.
Change-Id: I091d70e5e7498abdcc449eeca8dfe171d1ce0287
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qobject.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qobject.js b/src/qobject.js index 56c35a0..c3f5822 100644 --- a/src/qobject.js +++ b/src/qobject.js @@ -98,7 +98,7 @@ function QObject(name, data, webChannel) { } } -window.setupQObjectWebChannel = function(webChannel) { +window.setupQObjectWebChannel = function(webChannel, doneCallback) { webChannel.subscribe( "Qt.signal", function(payload) { @@ -119,5 +119,8 @@ window.setupQObjectWebChannel = function(webChannel) { window[objectName] = object; } } + if (doneCallback) { + doneCallback(); + } }); }; |