telepathy-qt: Services/Chan.I.Group: Removed BaseConnection argument from constructor.

Alexandr Akulich kaffeine at kemper.freedesktop.org
Fri Nov 20 08:40:11 PST 2015


Module: telepathy-qt
Branch: master
Commit: c6b68774e79e488fc449d25d6a3f975890ae0fb2
URL:    http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=c6b68774e79e488fc449d25d6a3f975890ae0fb2

Author: Alexandr Akulich <akulichalexander at gmail.com>
Date:   Sun Oct 11 14:46:39 2015 +0500

Services/Chan.I.Group: Removed BaseConnection argument from constructor.

---

 TelepathyQt/base-channel.cpp |   13 +++++++++----
 TelepathyQt/base-channel.h   |   11 ++++++-----
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/TelepathyQt/base-channel.cpp b/TelepathyQt/base-channel.cpp
index fb557e2..a379439 100644
--- a/TelepathyQt/base-channel.cpp
+++ b/TelepathyQt/base-channel.cpp
@@ -1784,8 +1784,8 @@ void BaseChannelChatStateInterface::chatStateChanged(uint contact, uint state)
 // Chan.I.Group
 // The BaseChannelGroupInterface code is fully or partially generated by the TelepathyQt-Generator.
 struct TP_QT_NO_EXPORT BaseChannelGroupInterface::Private {
-    Private(BaseChannelGroupInterface *parent, BaseConnection *connection)
-        : connection(connection),
+    Private(BaseChannelGroupInterface *parent)
+        : connection(0),
           selfHandle(0),
           adaptee(new BaseChannelGroupInterface::Adaptee(parent))
     {
@@ -2032,9 +2032,9 @@ void BaseChannelGroupInterface::Private::emitMembersChangedSignal(const UIntList
 /**
  * Class constructor.
  */
-BaseChannelGroupInterface::BaseChannelGroupInterface(Tp::BaseConnection *connection)
+BaseChannelGroupInterface::BaseChannelGroupInterface()
     : AbstractChannelInterface(TP_QT_IFACE_CHANNEL_INTERFACE_GROUP),
-      mPriv(new Private(this, connection))
+      mPriv(new Private(this))
 {
 }
 
@@ -2046,6 +2046,11 @@ BaseChannelGroupInterface::~BaseChannelGroupInterface()
     delete mPriv;
 }
 
+void BaseChannelGroupInterface::setBaseChannel(BaseChannel *channel)
+{
+    mPriv->connection = channel->connection();
+}
+
 /**
  * Return the immutable properties of this interface.
  *
diff --git a/TelepathyQt/base-channel.h b/TelepathyQt/base-channel.h
index dda8112..1af92a0 100644
--- a/TelepathyQt/base-channel.h
+++ b/TelepathyQt/base-channel.h
@@ -536,15 +536,15 @@ class TP_QT_EXPORT BaseChannelGroupInterface : public AbstractChannelInterface
     Q_DISABLE_COPY(BaseChannelGroupInterface)
 
 public:
-    static BaseChannelGroupInterfacePtr create(Tp::BaseConnection *connection)
+    static BaseChannelGroupInterfacePtr create()
     {
-        return BaseChannelGroupInterfacePtr(new BaseChannelGroupInterface(connection));
+        return BaseChannelGroupInterfacePtr(new BaseChannelGroupInterface());
     }
     template<typename BaseChannelGroupInterfaceSubclass>
-    static SharedPtr<BaseChannelGroupInterfaceSubclass> create(Tp::BaseConnection *connection)
+    static SharedPtr<BaseChannelGroupInterfaceSubclass> create()
     {
         return SharedPtr<BaseChannelGroupInterfaceSubclass>(
-                new BaseChannelGroupInterfaceSubclass(connection));
+                new BaseChannelGroupInterfaceSubclass());
     }
 
     virtual ~BaseChannelGroupInterface();
@@ -581,7 +581,8 @@ public:
     void removeMembers(const Tp::UIntList &contacts, const QString &message, uint reason, DBusError *error);
 
 protected:
-    BaseChannelGroupInterface(Tp::BaseConnection *connection);
+    BaseChannelGroupInterface();
+    void setBaseChannel(BaseChannel *channel);
 
 private:
     void createAdaptor();



More information about the telepathy-commits mailing list