summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2012-04-02 10:31:00 -0300
committerAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2012-04-02 10:31:00 -0300
commit2169b5b50ac788719930930e627b323adf14c1db (patch)
treeac833d2950460d1ff7cbc76ecd954fee807eb50c
parentd70953cef69f3ca41107c912d0cb5f541b230556 (diff)
BaseProtocol: Add more convenience methods for create.
-rw-r--r--TelepathyQt/base-protocol.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/TelepathyQt/base-protocol.h b/TelepathyQt/base-protocol.h
index 10572c6b..8b73c1ec 100644
--- a/TelepathyQt/base-protocol.h
+++ b/TelepathyQt/base-protocol.h
@@ -50,11 +50,19 @@ class TP_QT_EXPORT BaseProtocol : public DBusService
Q_DISABLE_COPY(BaseProtocol)
public:
+ static BaseProtocolPtr create(const QString &name)
+ {
+ return BaseProtocolPtr(new BaseProtocol(QDBusConnection::sessionBus(), name));
+ }
template<typename BaseProtocolSubclass>
static BaseProtocolPtr create(const QString &name)
{
return BaseProtocolPtr(new BaseProtocolSubclass(QDBusConnection::sessionBus(), name));
}
+ static BaseProtocolPtr create(const QDBusConnection &dbusConnection, const QString &name)
+ {
+ return BaseProtocolPtr(new BaseProtocol(dbusConnection, name));
+ }
template<typename BaseProtocolSubclass>
static BaseProtocolPtr create(const QDBusConnection &dbusConnection, const QString &name)
{