summaryrefslogtreecommitdiff
path: root/src/webchannel/qmetaobjectpublisher.cpp
diff options
context:
space:
mode:
authorLutz Schönemann <lutz.schoenemann@basyskom.com>2014-09-30 16:34:33 +0200
committerMilian Wolff <milian.wolff@kdab.com>2014-10-06 15:40:14 +0200
commit037c67962de3d74669c55a9db456ffd38a28480f (patch)
tree5dc666889adc5f269de4c10a51c5843b29bdfc7b /src/webchannel/qmetaobjectpublisher.cpp
parent46fc950424f9dedf014176153249d2f29bee8659 (diff)
downloadqtwebchannel-037c67962de3d74669c55a9db456ffd38a28480f.tar.gz
Fix: Delete objects even when no transport is available
The issue is that objects that get deleted will not be removed from the internal lists. This patch checks for destroyed signals in cases when no transport is available (no connection established). Change-Id: I384b9e9dc280887d41bbfa59476400e9d8b1199b Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'src/webchannel/qmetaobjectpublisher.cpp')
-rw-r--r--src/webchannel/qmetaobjectpublisher.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/webchannel/qmetaobjectpublisher.cpp b/src/webchannel/qmetaobjectpublisher.cpp
index 229afa2..1271fda 100644
--- a/src/webchannel/qmetaobjectpublisher.cpp
+++ b/src/webchannel/qmetaobjectpublisher.cpp
@@ -368,6 +368,8 @@ QJsonValue QMetaObjectPublisher::invokeMethod(QObject *const object, const int m
void QMetaObjectPublisher::signalEmitted(const QObject *object, const int signalIndex, const QVariantList &arguments)
{
if (!webChannel || webChannel->d_func()->transports.isEmpty()) {
+ if (signalIndex == s_destroyedSignalIndex)
+ objectDestroyed(object);
return;
}
if (!signalToPropertyMap.value(object).contains(signalIndex)) {