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

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


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

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

    Port share plugin away from kDebug
---
 plugins/{sftp/sftp_debug.h => share/share_debug.h} |  8 ++++----
 plugins/share/shareplugin.cpp                      | 17 ++++++++++-------
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/plugins/sftp/sftp_debug.h b/plugins/share/share_debug.h
similarity index 88%
copy from plugins/sftp/sftp_debug.h
copy to plugins/share/share_debug.h
index 30da8f8..d6cf416 100644
--- a/plugins/sftp/sftp_debug.h
+++ b/plugins/share/share_debug.h
@@ -18,11 +18,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SFTP_DEBUG_H
-#define SFTP_DEBUG_H
+#ifndef SHARE_DEBUG_H
+#define SHARE_DEBUG_H
 
 #include <QLoggingCategory>
 
-Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SFTP)
+Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SHARE)
 
-#endif //SFTP_DEBUG_H
\ No newline at end of file
+#endif //SHARE_DEBUG_H
\ No newline at end of file
diff --git a/plugins/share/shareplugin.cpp b/plugins/share/shareplugin.cpp
index 09e2bb0..47497f7 100644
--- a/plugins/share/shareplugin.cpp
+++ b/plugins/share/shareplugin.cpp
@@ -19,6 +19,7 @@
  */
 
 #include "shareplugin.h"
+#include "share_debug.h"
 
 #include <KGlobalSettings>
 #include <QIcon>
@@ -32,14 +33,16 @@
 #include <QDir>
 #include <QDesktopServices>
 #include <QDBusConnection>
+#include <QDebug>
 
-#include <core/kdebugnamespace.h>
 #include <core/filetransferjob.h>
 #include "autoclosingqfile.h"
 
 K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< SharePlugin >(); )
 K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_share", "kdeconnect-plugins") )
 
+Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SHARE, "kdeconnect.plugin.share");
+
 SharePlugin::SharePlugin(QObject* parent, const QVariantList& args)
     : KdeConnectPlugin(parent, args)
 {
@@ -61,7 +64,7 @@ QUrl SharePlugin::destinationDir() const
         url = url.arg(device()->name());
     }
 
-    kDebug(debugArea()) << url;
+    qCDebug(KDECONNECT_PLUGIN_SHARE) << url;
     QDir().mkpath(url);
 
     return url;
@@ -73,7 +76,7 @@ bool SharePlugin::receivePackage(const NetworkPackage& np)
     //TODO: Use this code to write a test
     if (np.type() == PACKAGE_TYPE_PING) {
 
-        kDebug(debugArea()) << "sending file" << (QDesktopServices::storageLocation(QDesktopServices::HomeLocation) + "/.bashrc");
+        qCDebug(KDECONNECT_PLUGIN_SHARE) << "sending file" << (QDesktopServices::storageLocation(QDesktopServices::HomeLocation) + "/.bashrc");
 
         NetworkPackage out(PACKAGE_TYPE_SHARE);
         out.set("filename", mDestinationDir + "itworks.txt");
@@ -89,10 +92,10 @@ bool SharePlugin::receivePackage(const NetworkPackage& np)
     }
 */
 
-    kDebug(debugArea()) << "File transfer";
+    qCDebug(KDECONNECT_PLUGIN_SHARE) << "File transfer";
 
     if (np.hasPayload()) {
-        //kDebug(debugArea()) << "receiving file";
+        //qCDebug(KDECONNECT_PLUGIN_SHARE) << "receiving file";
         QString filename = np.get<QString>("filename", QString::number(QDateTime::currentMSecsSinceEpoch()));
         QUrl destination = destinationDir();
         destination = destination.adjusted(QUrl::StripTrailingSlash);
@@ -122,7 +125,7 @@ bool SharePlugin::receivePackage(const NetworkPackage& np)
         QUrl url(np.get<QString>("url"));
         QDesktopServices::openUrl(url);
     } else {
-        kDebug(debugArea()) << "Error: Nothing attached!";
+        qCDebug(KDECONNECT_PLUGIN_SHARE) << "Error: Nothing attached!";
     }
 
     return true;
@@ -131,7 +134,7 @@ bool SharePlugin::receivePackage(const NetworkPackage& np)
 
 void SharePlugin::finished(KJob* job)
 {
-    kDebug(debugArea()) << "File transfer finished";
+    qCDebug(KDECONNECT_PLUGIN_SHARE) << "File transfer finished";
 
     bool error = (job->error() != 0);
 

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list