summaryrefslogtreecommitdiff
path: root/TelepathyQt4/contact-manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TelepathyQt4/contact-manager.cpp')
-rw-r--r--TelepathyQt4/contact-manager.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/TelepathyQt4/contact-manager.cpp b/TelepathyQt4/contact-manager.cpp
index d49d9415..fb5c4b62 100644
--- a/TelepathyQt4/contact-manager.cpp
+++ b/TelepathyQt4/contact-manager.cpp
@@ -132,6 +132,7 @@ struct TELEPATHY_QT4_NO_EXPORT ContactManager::Private
ChannelPtr storedChannel;
ChannelPtr denyChannel;
QMap<QString, ChannelPtr> contactListGroupChannels;
+ QList<ChannelPtr> removedContactListGroupChannels;
// avatar
UIntList requestAvatarsQueue;
@@ -2098,6 +2099,8 @@ void ContactManager::onContactListGroupRemovedFallback(Tp::DBusProxy *proxy,
QString id = contactListGroupChannel->immutableProperties().value(
QLatin1String(TELEPATHY_INTERFACE_CHANNEL ".TargetID")).toString();
mPriv->contactListGroupChannels.remove(id);
+ mPriv->removedContactListGroupChannels.append(contactListGroupChannel);
+ disconnect(contactListGroupChannel.data(), 0, 0, 0);
emit groupRemoved(id);
}
@@ -2276,6 +2279,17 @@ void ContactManager::addContactListGroupChannelFallback(
emit groupAdded(id);
}
+void ContactManager::resetContactListChannels()
+{
+ mPriv->contactListChannels.clear();
+ mPriv->subscribeChannel.reset();
+ mPriv->publishChannel.reset();
+ mPriv->storedChannel.reset();
+ mPriv->denyChannel.reset();
+ mPriv->contactListGroupChannels.clear();
+ mPriv->removedContactListGroupChannels.clear();
+}
+
QString ContactManager::featureToInterface(const Feature &feature)
{
if (feature == Contact::FeatureAlias) {