[Telepathy-commits] [telepathy-qt4/master] ContactManager: Removed isSupported method (not needed anymore).

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Wed Mar 25 10:28:05 PDT 2009


We now fallback to creating contacts even if Connection contacts interface
is not supported, so ContactManager is always supported.
---
 TelepathyQt4/Client/contact-manager.cpp |   16 ----------------
 TelepathyQt4/Client/contact-manager.h   |    1 -
 tests/dbus/contacts.cpp                 |    1 -
 3 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/TelepathyQt4/Client/contact-manager.cpp b/TelepathyQt4/Client/contact-manager.cpp
index 6de1556..76b65bc 100644
--- a/TelepathyQt4/Client/contact-manager.cpp
+++ b/TelepathyQt4/Client/contact-manager.cpp
@@ -90,16 +90,6 @@ Connection *ContactManager::connection() const
     return mPriv->conn;
 }
 
-bool ContactManager::isSupported() const
-{
-    if (!connection()->isReady()) {
-        warning() << "ContactManager::isSupported() used before the connection is ready!";
-        return false;
-    }
-
-    return true;
-}
-
 namespace
 {
 QString featureToInterface(Contact::Feature feature)
@@ -121,12 +111,6 @@ QString featureToInterface(Contact::Feature feature)
 
 QSet<Contact::Feature> ContactManager::supportedFeatures() const
 {
-    if (!isSupported()) {
-        warning() << "ContactManager::supportedFeatures() used with the entire ContactManager"
-            << "functionality being unsupported, returning an empty set";
-        return QSet<Contact::Feature>();
-    }
-
     if (mPriv->supportedFeatures.isEmpty()) {
         QList<Contact::Feature> allFeatures = QList<Contact::Feature>()
             << Contact::FeatureAlias
diff --git a/TelepathyQt4/Client/contact-manager.h b/TelepathyQt4/Client/contact-manager.h
index b6018b3..23bfd61 100644
--- a/TelepathyQt4/Client/contact-manager.h
+++ b/TelepathyQt4/Client/contact-manager.h
@@ -53,7 +53,6 @@ class ContactManager : public QObject
 
         Connection *connection() const;
 
-        bool isSupported() const;
         QSet<Contact::Feature> supportedFeatures() const;
 
         Contacts allKnownContacts() const;
diff --git a/tests/dbus/contacts.cpp b/tests/dbus/contacts.cpp
index c6d54ac..edc65c0 100644
--- a/tests/dbus/contacts.cpp
+++ b/tests/dbus/contacts.cpp
@@ -186,7 +186,6 @@ void TestContacts::init()
 void TestContacts::testSupport()
 {
     QCOMPARE(mConn->contactManager()->connection(), mConn);
-    QVERIFY(mConn->contactManager()->isSupported());
 
     QVERIFY(!mConn->contactAttributeInterfaces().isEmpty());
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list