telepathy-qt: BaseDebug: Fixed API

Alexandr Akulich kaffeine at kemper.freedesktop.org
Fri Sep 16 08:46:58 UTC 2016


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

Author: Alexandr Akulich <akulichalexander at gmail.com>
Date:   Fri Aug 12 14:55:28 2016 +0500

BaseDebug: Fixed API

Debug object should be registered with a custom busName, rather
than static TP_QT_IFACE_DEBUG.

---

 TelepathyQt/base-debug.cpp | 5 +++--
 TelepathyQt/base-debug.h   | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/TelepathyQt/base-debug.cpp b/TelepathyQt/base-debug.cpp
index a7a1c28..6e29e3d 100644
--- a/TelepathyQt/base-debug.cpp
+++ b/TelepathyQt/base-debug.cpp
@@ -195,18 +195,19 @@ QVariantMap BaseDebug::immutableProperties() const
     return QVariantMap();
 }
 
-bool BaseDebug::registerObject(Tp::DBusError *error)
+bool BaseDebug::registerObject(const QString &busName, DBusError *error)
 {
     if (isRegistered()) {
         return true;
     }
 
     DBusError _error;
-    bool ret = DBusService::registerObject(TP_QT_IFACE_DEBUG, TP_QT_DEBUG_OBJECT_PATH, &_error);
+    bool ret = DBusService::registerObject(busName, TP_QT_DEBUG_OBJECT_PATH, &_error);
 
     if (!ret && error) {
         error->set(_error.name(), _error.message());
     }
+
     return ret;
 }
 
diff --git a/TelepathyQt/base-debug.h b/TelepathyQt/base-debug.h
index 22d4bd3..0909a87 100644
--- a/TelepathyQt/base-debug.h
+++ b/TelepathyQt/base-debug.h
@@ -59,7 +59,7 @@ public Q_SLOTS:
 
     QVariantMap immutableProperties() const;
 
-    bool registerObject(DBusError *error = NULL);
+    bool registerObject(const QString &busName, DBusError *error = NULL);
 
 protected:
     class Adaptee;



More information about the telepathy-commits mailing list