[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:27:57 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=1e9df65

The following commit has been merged in the master branch:
commit 1e9df65d502cdf1e09ec615e70afb02a75baad2c
Author: Àlex Fiestas <afiestas at kde.org>
Date:   Mon Sep 22 00:44:47 2014 +0200

    Port mpris from kDebug to qCDebug
---
 plugins/mpriscontrol/mpriscontrolplugin.cpp | 15 ++++++++-------
 plugins/mpriscontrol/mpriscontrolplugin.h   |  3 +++
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/plugins/mpriscontrol/mpriscontrolplugin.cpp b/plugins/mpriscontrol/mpriscontrolplugin.cpp
index 7bd2251..9551711 100644
--- a/plugins/mpriscontrol/mpriscontrolplugin.cpp
+++ b/plugins/mpriscontrol/mpriscontrolplugin.cpp
@@ -28,7 +28,6 @@
 #include <QDBusReply>
 #include <QDBusMessage>
 
-#include <core/kdebugnamespace.h>
 #include <core/device.h>
 #include "mprisdbusinterface.h"
 #include "propertiesdbusinterface.h"
@@ -36,6 +35,8 @@
 K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< MprisControlPlugin >(); )
 K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_mpriscontrol", "kdeconnect-plugins") )
 
+Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MPRIS, "kdeconnect.plugin.mpris")
+
 MprisControlPlugin::MprisControlPlugin(QObject* parent, const QVariantList& args)
     : KdeConnectPlugin(parent, args)
 {
@@ -62,7 +63,7 @@ void MprisControlPlugin::serviceOwnerChanged(const QString &name,
 
     if (name.startsWith("org.mpris.MediaPlayer2")) {
 
-        kDebug(debugArea()) << "Mpris (un)registered in bus" << name << oldOwner << newOwner;
+        qCDebug(KDECONNECT_PLUGIN_MPRIS) << "Mpris (un)registered in bus" << name << oldOwner << newOwner;
 
         if (oldOwner.isEmpty()) {
             addPlayer(name);
@@ -78,7 +79,7 @@ void MprisControlPlugin::addPlayer(const QString& service)
     //FIXME: This call hangs and returns an empty string if KDED is still starting!
     const QString identity = mprisInterface.property("Identity").toString();
     playerList[identity] = service;
-    kDebug(debugArea()) << "Mpris addPlayer" << service << "->" << identity;
+    qCDebug(KDECONNECT_PLUGIN_MPRIS) << "Mpris addPlayer" << service << "->" << identity;
     sendPlayerList();
 
     OrgFreedesktopDBusPropertiesInterface* freedesktopInterface = new OrgFreedesktopDBusPropertiesInterface(service, "/org/mpris/MediaPlayer2", QDBusConnection::sessionBus(), this);
@@ -132,7 +133,7 @@ void MprisControlPlugin::propertiesChanged(const QString& propertyInterface, con
 void MprisControlPlugin::removePlayer(const QString& ifaceName)
 {
     const QString identity = playerList.key(ifaceName);
-    kDebug(debugArea()) << "Mpris removePlayer" << ifaceName << "->" << identity;
+    qCDebug(KDECONNECT_PLUGIN_MPRIS) << "Mpris removePlayer" << ifaceName << "->" << identity;
     playerList.remove(identity);
     sendPlayerList();
 }
@@ -157,18 +158,18 @@ bool MprisControlPlugin::receivePackage (const NetworkPackage& np)
     OrgMprisMediaPlayer2PlayerInterface mprisInterface(playerList[player], "/org/mpris/MediaPlayer2", QDBusConnection::sessionBus());
     if (np.has("action")) {
         const QString& action = np.get<QString>("action");
-        kDebug(debugArea()) << "Calling action" << action << "in" << playerList[player];
+        qCDebug(KDECONNECT_PLUGIN_MPRIS) << "Calling action" << action << "in" << playerList[player];
         //TODO: Check for valid actions
         mprisInterface.call(action);
     }
     if (np.has("setVolume")) {
         double volume = np.get<int>("setVolume")/100.f;
-        kDebug(debugArea()) << "Setting volume" << volume << "to" << playerList[player];
+        qCDebug(KDECONNECT_PLUGIN_MPRIS) << "Setting volume" << volume << "to" << playerList[player];
         mprisInterface.setVolume(volume);
     }
     if (np.has("Seek")) {
         int offset = np.get<int>("Seek");
-        kDebug(debugArea()) << "Seeking" << offset << "to" << playerList[player];
+        qCDebug(KDECONNECT_PLUGIN_MPRIS) << "Seeking" << offset << "to" << playerList[player];
         mprisInterface.Seek(offset);
     }
 
diff --git a/plugins/mpriscontrol/mpriscontrolplugin.h b/plugins/mpriscontrol/mpriscontrolplugin.h
index 7b1e6f5..20653d3 100644
--- a/plugins/mpriscontrol/mpriscontrolplugin.h
+++ b/plugins/mpriscontrol/mpriscontrolplugin.h
@@ -23,11 +23,14 @@
 
 #include <QString>
 #include <QHash>
+#include <QLoggingCategory>
 
 #include <core/kdeconnectplugin.h>
 
 #define PACKAGE_TYPE_MPRIS QLatin1String("kdeconnect.mpris")
 
+Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MPRIS)
+
 class MprisControlPlugin
     : public KdeConnectPlugin
 {

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list