summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2014-10-16 17:05:13 +0200
committerMilian Wolff <milian.wolff@kdab.com>2014-10-17 13:02:10 +0200
commitefbc8e0066f82ee530b4770e4484d6372e5e7cc1 (patch)
treefc20445402839240d1944821f594892ed3ecd4a6 /src
parent973b33e05c611b201660fc3e1581c44f81f82e43 (diff)
downloadqtwebchannel-efbc8e0066f82ee530b4770e4484d6372e5e7cc1.tar.gz
Never manually connect to the destroyed signal of any object.
The web channel always connects to that signal automatically for internal book-keeping purposes. Thus we do not have to connect to the signal for wrapped objects. This simplifies the tests and reduces the IPC traffic for wrapped objects. Change-Id: Iaf8d9ce0b87874917cdcdf9013e21a53ee36b53a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/webchannel/qwebchannel.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/webchannel/qwebchannel.js b/src/webchannel/qwebchannel.js
index 3feb829..d2c6525 100644
--- a/src/webchannel/qwebchannel.js
+++ b/src/webchannel/qwebchannel.js
@@ -236,8 +236,9 @@ function QObject(name, data, webChannel)
object.__objectSignals__[signalIndex] = object.__objectSignals__[signalIndex] || [];
object.__objectSignals__[signalIndex].push(callback);
- if (!isPropertyNotifySignal) {
+ if (!isPropertyNotifySignal && signalName !== "destroyed") {
// only required for "pure" signals, handled separately for properties in propertyUpdate
+ // also note that we always get notified about the destroyed signal
webChannel.exec({
type: QWebChannelMessageTypes.connectToSignal,
object: object.__id__,