[Telepathy-commits] [telepathy-qt4/master] Channel: Moved check for group interface on groupAdd/RemoveContacts bellow the check for groupCanAdd/RemoveContacts.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Tue Feb 10 12:13:59 PST 2009


---
 TelepathyQt4/Client/channel.cpp |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/TelepathyQt4/Client/channel.cpp b/TelepathyQt4/Client/channel.cpp
index cccd570..ff6c11a 100644
--- a/TelepathyQt4/Client/channel.cpp
+++ b/TelepathyQt4/Client/channel.cpp
@@ -1158,14 +1158,14 @@ PendingOperation *Channel::groupAddContacts(const QList<QSharedPointer<Contact>
         warning() << "Channel::groupAddContacts() used channel not ready";
         return new PendingFailure(this, TELEPATHY_ERROR_NOT_AVAILABLE,
                 "Channel not ready");
-    } else if (!mPriv->interfaces.contains(TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP)) {
-        warning() << "Channel::groupAddContacts() used with no group interface";
-        return new PendingFailure(this, TELEPATHY_ERROR_NOT_IMPLEMENTED,
-                "Channel does not support group interface");
     } else if (!groupCanAddContacts()) {
         warning() << "Channel::groupAddContacts() used but adding contacts is not supported";
         return new PendingFailure(this, TELEPATHY_ERROR_NOT_IMPLEMENTED,
                 "Channel does not support adding contacts");
+    } else if (!mPriv->interfaces.contains(TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP)) {
+        warning() << "Channel::groupAddContacts() used with no group interface";
+        return new PendingFailure(this, TELEPATHY_ERROR_NOT_IMPLEMENTED,
+                "Channel does not support group interface");
     } else if (contacts.isEmpty()) {
         warning() << "Channel::groupAddContacts() used with empty contacts param";
         return new PendingFailure(this, TELEPATHY_ERROR_INVALID_ARGUMENT,
@@ -1211,14 +1211,14 @@ PendingOperation *Channel::groupRemoveContacts(const QList<QSharedPointer<Contac
         warning() << "Channel::groupRemoveContacts() used channel not ready";
         return new PendingFailure(this, TELEPATHY_ERROR_NOT_AVAILABLE,
                 "Channel not ready");
-    } else if (!mPriv->interfaces.contains(TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP)) {
-        warning() << "Channel::groupRemoveContacts() used with no group interface";
-        return new PendingFailure(this, TELEPATHY_ERROR_NOT_IMPLEMENTED,
-                "Channel does not support group interface");
     } else if (!groupCanRemoveContacts()) {
         warning() << "Channel::groupRemoveContacts() used but removing contacts is not supported";
         return new PendingFailure(this, TELEPATHY_ERROR_NOT_IMPLEMENTED,
                 "Channel does not support removing contacts");
+    } else if (!mPriv->interfaces.contains(TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP)) {
+        warning() << "Channel::groupRemoveContacts() used with no group interface";
+        return new PendingFailure(this, TELEPATHY_ERROR_NOT_IMPLEMENTED,
+                "Channel does not support group interface");
     } else if (contacts.isEmpty()) {
         warning() << "Channel::groupRemoveContacts() used with empty contacts param";
         return new PendingFailure(this, TELEPATHY_ERROR_INVALID_ARGUMENT,
-- 
1.5.6.5




More information about the telepathy-commits mailing list