summaryrefslogtreecommitdiff
path: root/src/webchannel/qwebchannel.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-01 11:04:14 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-01 11:04:21 +0200
commitd342edcc22d3c9c0299e86805d93e7031507345b (patch)
tree29893a91dd70c3009e8f4343f9e4d447cf4dfb77 /src/webchannel/qwebchannel.cpp
parent58c800edb56d976d95cb2097e27cd39cfc02bf50 (diff)
parent3b28a6956cb3cab087481312dc82a907b118e0de (diff)
downloadqtwebchannel-d342edcc22d3c9c0299e86805d93e7031507345b.tar.gz
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: If2a4f50d03fccc2654b8336d9e40daea85d6adca
Diffstat (limited to 'src/webchannel/qwebchannel.cpp')
-rw-r--r--src/webchannel/qwebchannel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/webchannel/qwebchannel.cpp b/src/webchannel/qwebchannel.cpp
index c2e0d19..0e9a4c5 100644
--- a/src/webchannel/qwebchannel.cpp
+++ b/src/webchannel/qwebchannel.cpp
@@ -81,9 +81,11 @@ QT_BEGIN_NAMESPACE
*/
void QWebChannelPrivate::_q_transportDestroyed(QObject *object)
{
- const int idx = transports.indexOf(static_cast<QWebChannelAbstractTransport*>(object));
+ QWebChannelAbstractTransport *transport = static_cast<QWebChannelAbstractTransport*>(object);
+ const int idx = transports.indexOf(transport);
if (idx != -1) {
transports.remove(idx);
+ publisher->transportRemoved(transport);
}
}
@@ -252,6 +254,7 @@ void QWebChannel::disconnectFrom(QWebChannelAbstractTransport *transport)
disconnect(transport, 0, this, 0);
disconnect(transport, 0, d->publisher, 0);
d->transports.remove(idx);
+ d->publisher->transportRemoved(transport);
}
}