[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=008f082

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

    Port sftp pluging from kDebug to qCDebug
---
 plugins/sftp/mounter.cpp                           | 26 +++++++++++-----------
 plugins/sftp/sftp_config.cpp                       |  1 -
 .../notification_debug.h => sftp/sftp_debug.h}     |  8 +++----
 plugins/sftp/sftpplugin.cpp                        | 21 +++++++++--------
 4 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/plugins/sftp/mounter.cpp b/plugins/sftp/mounter.cpp
index 69d34c4..6e24619 100644
--- a/plugins/sftp/mounter.cpp
+++ b/plugins/sftp/mounter.cpp
@@ -20,13 +20,13 @@
 
 #include <QDir>
 #include <QTimerEvent>
+#include <QDebug>
 
 #include <KLocalizedString>
 #include <KStandardDirs>
 
-#include <core/kdebugnamespace.h>
-
 #include "mounter.h"
+#include "sftp_debug.h"
 
 static const char* idleTimeout_c = "idleTimeout";
 
@@ -59,13 +59,13 @@ Mounter::Mounter(SftpPlugin* sftp, int idleTimeout)
     m_idleTimer.setSingleShot(false);
     
     QTimer::singleShot(0, this, SLOT(start()));
-    kDebug(debugArea()) << "Created";
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << "Created";
 }
 
 Mounter::~Mounter()
 {
     unmount();
-    kDebug(debugArea()) << "Destroyed";
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << "Destroyed";
 }
 
 bool Mounter::wait()
@@ -75,7 +75,7 @@ bool Mounter::wait()
         return true;
     }
     
-    kDebug(debugArea()) << "Starting loop to wait for mount";
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << "Starting loop to wait for mount";
     
     MountLoop loop;
     connect(this, SIGNAL(mounted()), &loop, SLOT(successed()));
@@ -87,7 +87,7 @@ void Mounter::onPakcageReceived(const NetworkPackage& np)
 {
     if (np.get<bool>("stop", false))
     {
-        kDebug(debugArea()) << "SFTP server stopped";
+        qCDebug(KDECONNECT_PLUGIN_SFTP) << "SFTP server stopped";
         unmount();
         return;
     }
@@ -142,13 +142,13 @@ void Mounter::onPakcageReceived(const NetworkPackage& np)
 
     cleanMountPoint();
     
-    kDebug(debugArea()) << "Staring process: " << m_proc->program().join(" ");
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << "Staring process: " << m_proc->program().join(" ");
     m_proc->start();
 }
 
 void Mounter::onStarted()
 {
-    kDebug(debugArea()) << "Process started";
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << "Process started";
     m_started = true;
     Q_EMIT mounted();
     
@@ -167,7 +167,7 @@ void Mounter::onError(QProcess::ProcessError error)
 {
     if (error == QProcess::FailedToStart)
     {
-        kDebug(debugArea()) << "Process failed to start";
+        qCDebug(KDECONNECT_PLUGIN_SFTP) << "Process failed to start";
         m_started = false;
         Q_EMIT failed(i18n("Failed to start sshfs"));
     }
@@ -177,7 +177,7 @@ void Mounter::onFinished(int exitCode, QProcess::ExitStatus exitStatus)
 {
     if (exitStatus == QProcess::NormalExit)
     {
-        kDebug(debugArea()) << "Process finished (exit code: " << exitCode << ")";
+        qCDebug(KDECONNECT_PLUGIN_SFTP) << "Process finished (exit code: " << exitCode << ")";
         
         if (m_proc->property(idleTimeout_c).toBool())
         {
@@ -190,7 +190,7 @@ void Mounter::onFinished(int exitCode, QProcess::ExitStatus exitStatus)
     }
     else
     {
-        kDebug(debugArea()) << "Process failed (exit code: " << exitCode << ")";
+        qCDebug(KDECONNECT_PLUGIN_SFTP) << "Process failed (exit code: " << exitCode << ")";
         Q_EMIT failed(i18n("Error when accessing to filesystem"));
     }
     
@@ -201,7 +201,7 @@ void Mounter::onFinished(int exitCode, QProcess::ExitStatus exitStatus)
 
 void Mounter::onMountTimeout()
 {
-    kDebug(debugArea()) << "Timeout: device not responding";
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << "Timeout: device not responding";
     Q_EMIT failed(i18n("Failed to mount filesystem: device not responding"));
 }
 
@@ -211,7 +211,7 @@ void Mounter::onIdleTimeout()
     
     if (m_lastActivity.secsTo(QDateTime::currentDateTime()) >= m_idleTimer.interval() / 1000)
     {
-        kDebug(debugArea()) << "Timeout: there is no activity on moutned filesystem";
+        qCDebug(KDECONNECT_PLUGIN_SFTP) << "Timeout: there is no activity on moutned filesystem";
         m_proc->setProperty(idleTimeout_c, true);
         unmount();
     }
diff --git a/plugins/sftp/sftp_config.cpp b/plugins/sftp/sftp_config.cpp
index 3eaea2e..d53718e 100644
--- a/plugins/sftp/sftp_config.cpp
+++ b/plugins/sftp/sftp_config.cpp
@@ -29,7 +29,6 @@
 #include <KIconLoader>
 
 #include "sftpplugin.h"
-#include <core/kdebugnamespace.h>
 
 #include "ui_sftp_config.h"
 
diff --git a/plugins/notifications/notification_debug.h b/plugins/sftp/sftp_debug.h
similarity index 86%
copy from plugins/notifications/notification_debug.h
copy to plugins/sftp/sftp_debug.h
index 09da52f..30da8f8 100644
--- a/plugins/notifications/notification_debug.h
+++ b/plugins/sftp/sftp_debug.h
@@ -18,11 +18,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NOTIFICATION_DEBUG_H
-#define NOTIFICATION_DEBUG_H
+#ifndef SFTP_DEBUG_H
+#define SFTP_DEBUG_H
 
 #include <QLoggingCategory>
 
-Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_NOTIFICATION)
+Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SFTP)
 
-#endif //NOTIFICATION_DEBUG_H
\ No newline at end of file
+#endif //SFTP_DEBUG_H
\ No newline at end of file
diff --git a/plugins/sftp/sftpplugin.cpp b/plugins/sftp/sftpplugin.cpp
index 0292761..0d7f301 100644
--- a/plugins/sftp/sftpplugin.cpp
+++ b/plugins/sftp/sftpplugin.cpp
@@ -19,9 +19,11 @@
  */
 
 #include "sftpplugin.h"
+#include "sftp_debug.h"
 
 #include <QDBusConnection>
 #include <QDir>
+#include <QDebug>
 
 #include <KConfig>
 #include <KConfigGroup>
@@ -35,11 +37,12 @@
 
 #include "sftp_config.h"
 #include "mounter.h"
-#include <core/kdebugnamespace.h>
 
 K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< SftpPlugin >(); )
 K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_sftp", "kdeconnect-plugins") )
 
+Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SFTP, "kdeconnect.plugin.sftp")
+
 static const QSet<QString> fields_c = QSet<QString>() << "ip" << "port" << "user" << "port" << "path";
 
 struct SftpPlugin::Pimpl
@@ -56,7 +59,7 @@ SftpPlugin::SftpPlugin(QObject *parent, const QVariantList &args)
     , m_d(new Pimpl)
 { 
     addToDolphin();
-    kDebug(debugArea()) << "Created device:" << device()->name();
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << "Created device:" << device()->name();
 }
 
 SftpPlugin::~SftpPlugin()
@@ -64,7 +67,7 @@ SftpPlugin::~SftpPlugin()
     QDBusConnection::sessionBus().unregisterObject(dbusPath(), QDBusConnection::UnregisterTree);
     removeFromDolphin();    
     unmount();
-    kDebug(debugArea()) << "Destroyed device:" << device()->name();
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << "Destroyed device:" << device()->name();
 }
 
 void SftpPlugin::addToDolphin()
@@ -72,7 +75,7 @@ void SftpPlugin::addToDolphin()
     removeFromDolphin();
     QUrl kioUrl("kdeconnect://"+device()->id()+"/");
     m_d->placesModel.addPlace(device()->name(), kioUrl, "kdeconnect");
-    kDebug(debugArea()) << "add to dolphin";
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << "add to dolphin";
 }
 
 void SftpPlugin::removeFromDolphin()
@@ -88,12 +91,12 @@ void SftpPlugin::removeFromDolphin()
 void SftpPlugin::connected()
 {
     bool state = QDBusConnection::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportScriptableContents);
-    kDebug(debugArea()) << "Exposing DBUS interface: " << state;
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << "Exposing DBUS interface: " << state;
 }
 
 void SftpPlugin::mount()
 {
-    kDebug(debugArea()) << "Mount device:" << device()->name();
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << "Mount device:" << device()->name();
     if (m_d->mounter) {
         return;
     }
@@ -160,7 +163,7 @@ QString SftpPlugin::mountPoint()
 
 void SftpPlugin::onMounted()
 {
-    kDebug(debugArea()) << device()->name() << QString("Remote filesystem mounted at %1").arg(mountPoint());
+    qCDebug(KDECONNECT_PLUGIN_SFTP) << device()->name() << QString("Remote filesystem mounted at %1").arg(mountPoint());
 
     Q_EMIT mounted();
 }
@@ -168,9 +171,9 @@ void SftpPlugin::onMounted()
 void SftpPlugin::onUnmounted(bool idleTimeout)
 {
     if (idleTimeout) {
-        kDebug(debugArea()) << device()->name() << "Remote filesystem unmounted by idle timeout";
+        qCDebug(KDECONNECT_PLUGIN_SFTP) << device()->name() << "Remote filesystem unmounted by idle timeout";
     } else {
-        kDebug(debugArea()) << device()->name() << "Remote filesystem unmounted";
+        qCDebug(KDECONNECT_PLUGIN_SFTP) << device()->name() << "Remote filesystem unmounted";
     }
 
     unmount();

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list