summaryrefslogtreecommitdiff
path: root/src
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-12-02 19:12:55 +0100
commit6a352361a54afa4b340e88771ff885ee32b932f2 (patch)
treeacc215920db0a444069e376b98bee6bf06c1cf09 /src
parent81dac6e848da8e8a071a2069862590889a287067 (diff)
downloadqtwebchannel-6a352361a54afa4b340e88771ff885ee32b932f2.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). cherry picked from commit 037c67962de3d74669c55a9db456ffd38a28480f Change-Id: I24e345dcbfe88e15031d288eb65abb2c3066d4c0 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'src')
-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 90c39ff..b3ae23c 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)) {