diff options
author | Lutz Schönemann <lutz.schoenemann@basyskom.com> | 2014-09-30 16:34:33 +0200 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2014-10-06 15:40:14 +0200 |
commit | 037c67962de3d74669c55a9db456ffd38a28480f (patch) | |
tree | 5dc666889adc5f269de4c10a51c5843b29bdfc7b /src/webchannel/qmetaobjectpublisher.cpp | |
parent | 46fc950424f9dedf014176153249d2f29bee8659 (diff) | |
download | qtwebchannel-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.cpp | 2 |
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)) { |