summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Akulich <akulichalexander@gmail.com>2015-10-11 14:54:28 +0500
committerAlexandr Akulich <akulichalexander@gmail.com>2015-11-20 21:38:53 +0500
commit0ebd71d9a87af7ec3b7a77a79d215e5d7613cb87 (patch)
tree5a1c9a230515ba15703b454804291da30649b85c
parentc6b68774e79e488fc449d25d6a3f975890ae0fb2 (diff)
Services/Conn.I.Contacts: Restored full API-compatibility with 0.9.6.
setBaseConnection() overloaded to get connection ptr.
-rw-r--r--TelepathyQt/base-connection.cpp13
-rw-r--r--TelepathyQt/base-connection.h11
2 files changed, 15 insertions, 9 deletions
diff --git a/TelepathyQt/base-connection.cpp b/TelepathyQt/base-connection.cpp
index d62b0310..dd902371 100644
--- a/TelepathyQt/base-connection.cpp
+++ b/TelepathyQt/base-connection.cpp
@@ -948,8 +948,8 @@ void BaseConnectionRequestsInterface::createChannel(const QVariantMap &request,
// Conn.I.Contacts
// The BaseConnectionContactsInterface code is fully or partially generated by the TelepathyQt-Generator.
struct TP_QT_NO_EXPORT BaseConnectionContactsInterface::Private {
- Private(BaseConnectionContactsInterface *parent, BaseConnection *connection)
- : connection(connection),
+ Private(BaseConnectionContactsInterface *parent)
+ : connection(0),
adaptee(new BaseConnectionContactsInterface::Adaptee(parent))
{
}
@@ -1014,9 +1014,9 @@ void BaseConnectionContactsInterface::Adaptee::getContactByID(const QString &ide
/**
* Class constructor.
*/
-BaseConnectionContactsInterface::BaseConnectionContactsInterface(BaseConnection *connection)
+BaseConnectionContactsInterface::BaseConnectionContactsInterface()
: AbstractConnectionInterface(TP_QT_IFACE_CONNECTION_INTERFACE_CONTACTS),
- mPriv(new Private(this, connection))
+ mPriv(new Private(this))
{
}
@@ -1028,6 +1028,11 @@ BaseConnectionContactsInterface::~BaseConnectionContactsInterface()
delete mPriv;
}
+void BaseConnectionContactsInterface::setBaseConnection(BaseConnection *connection)
+{
+ mPriv->connection = connection;
+}
+
/**
* Return the immutable properties of this interface.
*
diff --git a/TelepathyQt/base-connection.h b/TelepathyQt/base-connection.h
index 044f0be0..bed8b68a 100644
--- a/TelepathyQt/base-connection.h
+++ b/TelepathyQt/base-connection.h
@@ -202,15 +202,15 @@ class TP_QT_EXPORT BaseConnectionContactsInterface : public AbstractConnectionIn
Q_DISABLE_COPY(BaseConnectionContactsInterface)
public:
- static BaseConnectionContactsInterfacePtr create(BaseConnection *connection)
+ static BaseConnectionContactsInterfacePtr create()
{
- return BaseConnectionContactsInterfacePtr(new BaseConnectionContactsInterface(connection));
+ return BaseConnectionContactsInterfacePtr(new BaseConnectionContactsInterface());
}
template<typename BaseConnectionContactsInterfaceSubclass>
- static SharedPtr<BaseConnectionContactsInterfaceSubclass> create(BaseConnection *connection)
+ static SharedPtr<BaseConnectionContactsInterfaceSubclass> create()
{
return SharedPtr<BaseConnectionContactsInterfaceSubclass>(
- new BaseConnectionContactsInterfaceSubclass(connection));
+ new BaseConnectionContactsInterfaceSubclass());
}
virtual ~BaseConnectionContactsInterface();
@@ -227,7 +227,8 @@ public:
void getContactByID(const QString &identifier, const QStringList &interfaces, uint &handle, QVariantMap &attributes, DBusError *error);
protected:
- BaseConnectionContactsInterface(BaseConnection *connection);
+ BaseConnectionContactsInterface();
+ void setBaseConnection(BaseConnection *connection);
private:
void createAdaptor();