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

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:28:26 UTC 2016


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

The following commit has been merged in the master branch:
commit 491b1ed25be4283abd8d1f68f58b8360a8ee5958
Author: Aleix Pol <aleixpol at kde.org>
Date:   Wed Apr 1 16:06:12 2015 +0200

    Don't treat local paths as Url's
    
    It could have been fixed by changing QUrl(dir) into QUrl::fromLocalFile(dir)
    but this way we get to have a non-local destinationDir.
    
    CCMAIL: bansal.ashish096 at gmail.com
---
 plugins/share/shareplugin.cpp | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/plugins/share/shareplugin.cpp b/plugins/share/shareplugin.cpp
index c6c97b3..5a19b30 100644
--- a/plugins/share/shareplugin.cpp
+++ b/plugins/share/shareplugin.cpp
@@ -31,6 +31,7 @@
 #include <KLocalizedString>
 #include <KJobTrackerInterface>
 #include <KPluginFactory>
+#include <KIO/MkpathJob>
 
 #include <core/filetransferjob.h>
 #include "autoclosingqfile.h"
@@ -81,17 +82,20 @@ SharePlugin::SharePlugin(QObject* parent, const QVariantList& args)
 
 QUrl SharePlugin::destinationDir() const
 {
-    const QString defaultDownloadPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
-    QString dir = config()->get<QString>("incoming_path", defaultDownloadPath);
+    const QUrl defaultDownloadPath = QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation));
+    QUrl dir = config()->get<QUrl>("incoming_path", defaultDownloadPath);
 
-    if (dir.contains("%1")) {
-        dir = dir.arg(device()->name());
+    if (dir.path().contains("%1")) {
+        dir.setPath(dir.path().arg(device()->name()));
     }
 
-//     qCDebug(KDECONNECT_PLUGIN_SHARE) << dir;
-    QDir().mkpath(dir);
+    KJob* job = KIO::mkpath(dir);
+    bool ret = job->exec();
+    if (!ret) {
+        qWarning() << "couldn't create" << dir;
+    }
 
-    return QUrl(dir);
+    return dir;
 }
 
 bool SharePlugin::receivePackage(const NetworkPackage& np)

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list