summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlli Salli <ollisal@gmail.com>2010-12-08 15:12:51 +0200
committerOlli Salli <ollisal@gmail.com>2010-12-08 18:20:44 +0200
commit0c7dbdfc80c3379435a716b7c8b2f08574c7bacf (patch)
tree8d6e3ff693eb1cb9bcdbefcfd61b11665a391d8c
parent75d622456f1ca6a9bd79abee82e564bf91ae41b4 (diff)
AccountSet: Disconnect wrapper signals when we remove the wrapper
If we don't, if the account object path is reused quickly, we might get a property change for the new account at that path before the old proxy realises it should invalidate itself and stop emitting signals. We get the properties to filter on correctly when the account is signaled as being re-added (after a new proxy is built), at which point AccountSet just checks all properties on the new proxy, so we don't lose any important events doing this. Reviewed-by: Andre Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>
-rw-r--r--TelepathyQt4/account-set.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/TelepathyQt4/account-set.cpp b/TelepathyQt4/account-set.cpp
index 909fbbe0..180a5abc 100644
--- a/TelepathyQt4/account-set.cpp
+++ b/TelepathyQt4/account-set.cpp
@@ -111,6 +111,7 @@ void AccountSet::Private::removeAccount(const Tp::AccountPtr &account)
accounts.remove(accountPath);
AccountWrapper *wrapper = wrappers.take(accountPath);
+ Q_ASSERT(wrapper->disconnect(parent));
wrapper->deleteLater();
emit parent->accountRemoved(account);