From c6b68774e79e488fc449d25d6a3f975890ae0fb2 Mon Sep 17 00:00:00 2001 From: Alexandr Akulich Date: Sun, 11 Oct 2015 14:46:39 +0500 Subject: 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 fb557e22..a3794392 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 dda8112c..1af92a04 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 - static SharedPtr create(Tp::BaseConnection *connection) + static SharedPtr create() { return SharedPtr( - 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(); -- cgit v1.2.3