[telepathy-qt4/master] Correctly order constructors before the members in pimpl structs

Olli Salli olli.salli at collabora.co.uk
Tue Jun 30 14:16:29 PDT 2009


---
 TelepathyQt4/channel.cpp            |    6 +++---
 TelepathyQt4/connection-manager.cpp |   16 ++++++++--------
 TelepathyQt4/readiness-helper.cpp   |   14 +++++++-------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/TelepathyQt4/channel.cpp b/TelepathyQt4/channel.cpp
index 7c83e57..2368c3d 100644
--- a/TelepathyQt4/channel.cpp
+++ b/TelepathyQt4/channel.cpp
@@ -1544,11 +1544,11 @@ Contacts Channel::groupRemotePendingContacts() const
 
 struct Channel::GroupMemberChangeDetails::Private : public QSharedData
 {
-    ContactPtr actor;
-    QVariantMap details;
-
     Private(const ContactPtr &actor, const QVariantMap &details)
         : actor(actor), details(details) {}
+
+    ContactPtr actor;
+    QVariantMap details;
 };
 
 Channel::GroupMemberChangeDetails::GroupMemberChangeDetails()
diff --git a/TelepathyQt4/connection-manager.cpp b/TelepathyQt4/connection-manager.cpp
index 2b76635..383f2e4 100644
--- a/TelepathyQt4/connection-manager.cpp
+++ b/TelepathyQt4/connection-manager.cpp
@@ -64,16 +64,16 @@ namespace Tp
 
 struct ProtocolParameter::Private
 {
+    Private(const QString &name, const QDBusSignature &dbusSignature, QVariant::Type type,
+            const QVariant &defaultValue, ConnMgrParamFlag flags)
+        : name(name), dbusSignature(dbusSignature), type(type), defaultValue(defaultValue),
+          flags(flags) {}
+
     QString name;
     QDBusSignature dbusSignature;
     QVariant::Type type;
     QVariant defaultValue;
     ConnMgrParamFlag flags;
-
-    Private(const QString &name, const QDBusSignature &dbusSignature, QVariant::Type type,
-            const QVariant &defaultValue, ConnMgrParamFlag flags)
-        : name(name), dbusSignature(dbusSignature), type(type), defaultValue(defaultValue),
-          flags(flags) {}
 };
 
 ProtocolParameter::ProtocolParameter(const QString &name,
@@ -138,12 +138,12 @@ bool ProtocolParameter::operator==(const QString &name) const
 
 struct ProtocolInfo::Private
 {
+    Private(const QString &cmName, const QString &name)
+        : cmName(cmName), name(name) {}
+
     QString cmName;
     QString name;
     ProtocolParameterList params;
-
-    Private(const QString &cmName, const QString &name)
-        : cmName(cmName), name(name) {}
 };
 
 /**
diff --git a/TelepathyQt4/readiness-helper.cpp b/TelepathyQt4/readiness-helper.cpp
index c7e6db0..c22291b 100644
--- a/TelepathyQt4/readiness-helper.cpp
+++ b/TelepathyQt4/readiness-helper.cpp
@@ -38,13 +38,6 @@ namespace Tp
 
 struct ReadinessHelper::Introspectable::Private : public QSharedData
 {
-    QSet<uint> makesSenseForStatuses;
-    Features dependsOnFeatures;
-    QStringList dependsOnInterfaces;
-    IntrospectFunc introspectFunc;
-    void *introspectFuncData;
-    bool critical;
-
     Private(const QSet<uint> &makesSenseForStatuses,
             const Features &dependsOnFeatures,
             const QStringList &dependsOnInterfaces,
@@ -57,6 +50,13 @@ struct ReadinessHelper::Introspectable::Private : public QSharedData
         introspectFunc(introspectFunc),
         introspectFuncData(introspectFuncData),
         critical(critical) {}
+
+    QSet<uint> makesSenseForStatuses;
+    Features dependsOnFeatures;
+    QStringList dependsOnInterfaces;
+    IntrospectFunc introspectFunc;
+    void *introspectFuncData;
+    bool critical;
 };
 
 ReadinessHelper::Introspectable::Introspectable()
-- 
1.5.6.5



More information about the telepathy-commits mailing list