[telepathy-qt4/master] ConnectionManager: Standardize class definition.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Mon Jun 29 08:33:19 PDT 2009


- Moved public xxxInterface methods definition to the end of the public methods
  declaration.
- Added friend struct Private declaration.
- Added Q_DISABLE_COPY(xxx) to all classes that can not be copied.
- Moved Q_DISABLE_COPY(xxx) declaration to the top of the class definition,
  before the public keyword.
- Reorder public, protected, SIGNALS declaration as follows:
   public
   public Q_SLOTS
   Q_SIGNALS
   protected
   protected Q_SLOTS
   private Q_SLOTS
   private
- Moved friend class xxx definitions to be placed right bellow private keyword.
---
 TelepathyQt4/connection-manager.h |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/TelepathyQt4/connection-manager.h b/TelepathyQt4/connection-manager.h
index 80d86bf..86bcb5f 100644
--- a/TelepathyQt4/connection-manager.h
+++ b/TelepathyQt4/connection-manager.h
@@ -85,7 +85,6 @@ private:
     ConnMgrParamFlag mFlags;
 };
 
-
 class ProtocolInfo
 {
 public:
@@ -115,13 +114,13 @@ private:
     QString mName;
 };
 
-
 class ConnectionManager : public StatelessDBusProxy,
                           public OptionalInterfaceFactory<ConnectionManager>,
                           public ReadyObject,
                           public RefCounted
 {
     Q_OBJECT
+    Q_DISABLE_COPY(ConnectionManager);
 
 public:
     static const Feature FeatureCore;
@@ -130,7 +129,7 @@ public:
     static ConnectionManagerPtr create(const QDBusConnection &bus,
             const QString &name);
 
-    virtual ~ConnectionManager();
+    ~ConnectionManager();
 
     QString name() const;
 
@@ -140,13 +139,14 @@ public:
     PendingConnection *requestConnection(const QString &protocol,
             const QVariantMap &parameters);
 
+    static PendingStringList *listNames(
+            const QDBusConnection &bus = QDBusConnection::sessionBus());
+
     inline Client::DBus::PropertiesInterface *propertiesInterface() const
     {
         return OptionalInterfaceFactory<ConnectionManager>::interface<Client::DBus::PropertiesInterface>();
     }
 
-    static PendingStringList *listNames(const QDBusConnection &bus = QDBusConnection::sessionBus());
-
 protected:
     ConnectionManager(const QString &name);
     ConnectionManager(const QDBusConnection &bus, const QString &name);
@@ -159,11 +159,10 @@ private Q_SLOTS:
     void gotParameters(QDBusPendingCallWatcher *);
 
 private:
-    Q_DISABLE_COPY(ConnectionManager);
+    friend class PendingConnection;
 
     struct Private;
     friend struct Private;
-    friend class PendingConnection;
     Private *mPriv;
 };
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list