[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:04:36 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=bdc2dfa

The following commit has been merged in the master branch:
commit bdc2dfaf0c8341ad4a56999a69342a3b2ccfd65a
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Wed Oct 5 00:21:47 2011 +0100

    Redirect Telepathy-Qt4 output to KDebug
    
    This will be disabled until https://bugs.freedesktop.org/show_bug.cgi?id=41199 is merged
---
 telepathy-handler-application.cpp | 36 ++++++++++++++++++++++++++++++++----
 telepathy-handler-application.h   |  1 +
 2 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/telepathy-handler-application.cpp b/telepathy-handler-application.cpp
index 4079f61..ecbd18c 100644
--- a/telepathy-handler-application.cpp
+++ b/telepathy-handler-application.cpp
@@ -31,6 +31,23 @@ extern bool kde_kdebug_enable_dbus_interface;
 
 namespace KTelepathy {
 
+
+namespace {
+int s_tpqt4DebugArea;
+
+#if (0) //TODO check tp version
+static void tpDebugCallback(const QString &libraryName,
+                            const QString &libraryVersion,
+                            QtMsgType type,
+                            const QString &msg)
+{
+    Q_UNUSED(libraryName)
+    Q_UNUSED(libraryVersion)
+    kDebugStream(type, s_tpqt4DebugArea, __FILE__, __LINE__, "Telepathy-Qt4") << qPrintable(msg);
+}
+#endif
+}
+
 class TelepathyHandlerApplication::Private
 {
 public:
@@ -95,6 +112,9 @@ KComponentData TelepathyHandlerApplication::Private::initHack()
     KCmdLineArgs *args = KCmdLineArgs::parsedArgs("kde-telepathy");
     Private::s_persist = args->isSet("persist");
     Private::s_debug = args->isSet("debug");
+
+    s_tpqt4DebugArea = KDebug::registerArea("Telepathy-Qt4");
+
     return cData;
 }
 
@@ -109,14 +129,22 @@ void TelepathyHandlerApplication::Private::init(int initialTimeout, int timeout)
         q->setQuitOnLastWindowClosed(false);
     }
 
+    // Register TpQt4 types
     Tp::registerTypes();
-    //Enable telepathy-Qt4 debug
+
+#if (0) // TODO check tp version
+    // Redirect Tp debug and warnings to KDebug output
+    Tp::setDebugCallback(&tpDebugCallback);
+#endif
+
+    // Enable telepathy-Qt4 debug
     Tp::enableDebug(s_debug);
     Tp::enableWarnings(true);
 
-    if (s_debug) {
-        kde_kdebug_enable_dbus_interface = true;
-    }
+    // Enable KDebug DBus interface
+    // FIXME This must be enabled here because there is a bug in plasma
+    //       it should be removed when this is fixed
+    kde_kdebug_enable_dbus_interface = s_debug;
 
     if (!Private::s_persist) {
         timer = new QTimer(q);
diff --git a/telepathy-handler-application.h b/telepathy-handler-application.h
index f931438..455463d 100644
--- a/telepathy-handler-application.h
+++ b/telepathy-handler-application.h
@@ -33,6 +33,7 @@ namespace KTelepathy {
  * - Adds the --persist option to inhibit automatic exit.
  * - Adds the --debug option to enable telepathy-qt4 debug
  * - Enables telepathy-qt4 warnings
+ * - Use Tp-Qt4 callback for redirecting debug output into KDebug
  */
 class TelepathyHandlerApplication : public KApplication
 {

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list