[telepathy-qt4/master] Contact: Added removeFromGroup support.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Wed Jul 22 00:52:55 PDT 2009


---
 TelepathyQt4/contact.cpp |    8 ++++++++
 TelepathyQt4/contact.h   |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/TelepathyQt4/contact.cpp b/TelepathyQt4/contact.cpp
index bd59edf..7817291 100644
--- a/TelepathyQt4/contact.cpp
+++ b/TelepathyQt4/contact.cpp
@@ -221,6 +221,14 @@ PendingOperation *Contact::addToGroup(const QString &group)
             group, QList<ContactPtr>() << self);
 }
 
+PendingOperation *Contact::removeFromGroup(const QString &group)
+{
+    ContactPtr self =
+        mPriv->manager->lookupContactByHandle(mPriv->handle[0]);
+    return mPriv->manager->groupRemoveContacts(
+            group, QList<ContactPtr>() << self);
+}
+
 Contact::~Contact()
 {
     debug() << "Contact" << id() << "destroyed";
diff --git a/TelepathyQt4/contact.h b/TelepathyQt4/contact.h
index b066eb3..7d8f886 100644
--- a/TelepathyQt4/contact.h
+++ b/TelepathyQt4/contact.h
@@ -88,6 +88,7 @@ public:
     PendingOperation *block(bool value = true);
 
     PendingOperation *addToGroup(const QString &group);
+    PendingOperation *removeFromGroup(const QString &group);
 
     ~Contact();
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list