[Telepathy-commits] [telepathy-qt4/master] Connection: Use ContactPtr typedef.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Wed Mar 18 10:35:50 PDT 2009


---
 TelepathyQt4/Client/connection.cpp |    7 +++----
 TelepathyQt4/Client/connection.h   |    4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/TelepathyQt4/Client/connection.cpp b/TelepathyQt4/Client/connection.cpp
index 0837681..e279b0c 100644
--- a/TelepathyQt4/Client/connection.cpp
+++ b/TelepathyQt4/Client/connection.cpp
@@ -45,7 +45,6 @@
 #include <QMutexLocker>
 #include <QPair>
 #include <QQueue>
-#include <QSharedPointer>
 #include <QString>
 #include <QTimer>
 #include <QtGlobal>
@@ -113,7 +112,7 @@ struct Connection::Private
     uint statusReason;
 
     SimpleStatusSpecMap simplePresenceStatuses;
-    QSharedPointer<Contact> selfContact;
+    ContactPtr selfContact;
     QStringList contactAttributeInterfaces;
     uint selfHandle;
     QMap<uint, ContactManager::ContactListChannel> contactListsChannels;
@@ -609,7 +608,7 @@ PendingOperation *Connection::setSelfPresence(const QString &status,
             simplePresenceInterface()->SetPresence(status, statusMessage));
 }
 
-QSharedPointer<Contact> Connection::selfContact() const
+ContactPtr Connection::selfContact() const
 {
     if (!isReady()) {
         warning() << "Connection::selfContact() used before the connection is ready!";
@@ -871,7 +870,7 @@ void Connection::gotSelfContact(PendingOperation *op)
 
     if (pending->isValid()) {
         Q_ASSERT(pending->contacts().size() == 1);
-        QSharedPointer<Contact> contact = pending->contacts()[0];
+        ContactPtr contact = pending->contacts()[0];
 
         if (mPriv->selfContact != contact) {
             mPriv->selfContact = contact;
diff --git a/TelepathyQt4/Client/connection.h b/TelepathyQt4/Client/connection.h
index 61e7ce0..1fb9f55 100644
--- a/TelepathyQt4/Client/connection.h
+++ b/TelepathyQt4/Client/connection.h
@@ -28,6 +28,7 @@
 
 #include <TelepathyQt4/_gen/cli-connection.h>
 
+#include <TelepathyQt4/Client/Contact>
 #include <TelepathyQt4/Client/DBus>
 #include <TelepathyQt4/Client/DBusProxy>
 #include <TelepathyQt4/Client/OptionalInterfaceFactory>
@@ -38,7 +39,6 @@
 #include <TelepathyQt4/Types>
 
 #include <QSet>
-#include <QSharedPointer>
 #include <QString>
 #include <QStringList>
 
@@ -98,7 +98,7 @@ public:
     SimpleStatusSpecMap allowedPresenceStatuses() const;
     PendingOperation *setSelfPresence(const QString &status, const QString &statusMessage);
 
-    QSharedPointer<Contact> selfContact() const;
+    ContactPtr selfContact() const;
 
     template <class Interface>
     inline Interface *optionalInterface(
-- 
1.5.6.5




More information about the telepathy-commits mailing list