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

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


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

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

    Port from KGLobalSettings to QStandardPaths
    
    QStandardPaths::writableLocation is the way to locate "where to download
    files" with Qt5, so port to it.
---
 plugins/share/share_config.cpp | 7 +++++--
 plugins/share/shareplugin.cpp  | 3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/plugins/share/share_config.cpp b/plugins/share/share_config.cpp
index f26a8ca..be2beba 100644
--- a/plugins/share/share_config.cpp
+++ b/plugins/share/share_config.cpp
@@ -20,6 +20,8 @@
 
 #include "share_config.h"
 
+#include <QStandardPaths>
+
 #include <KConfigGroup>
 #include <KGlobalSettings>
 #include <KPluginFactory>
@@ -50,7 +52,7 @@ void ShareConfig::defaults()
 {
     KCModule::defaults();
 
-    m_ui->kurlrequester->setUrl(KGlobalSettings::downloadPath());
+    m_ui->kurlrequester->setUrl(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation));
 
     Q_EMIT changed(true);
 }
@@ -60,7 +62,8 @@ void ShareConfig::load()
 {
     KCModule::load();
 
-    m_ui->kurlrequester->setUrl(m_cfg->group("receive").readEntry("path", KGlobalSettings::downloadPath()));
+    m_ui->kurlrequester->setUrl(m_cfg->group("receive").readEntry("path",
+                                QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)));
 
     Q_EMIT changed(false);
 }
diff --git a/plugins/share/shareplugin.cpp b/plugins/share/shareplugin.cpp
index be595ab..9a9ea06 100644
--- a/plugins/share/shareplugin.cpp
+++ b/plugins/share/shareplugin.cpp
@@ -51,7 +51,8 @@ QUrl SharePlugin::destinationDir() const
 {
     //FIXME: There should be a better way to listen to changes in the config file instead of reading the value each time
     KSharedConfigPtr config = KSharedConfig::openConfig("kdeconnect/plugins/share");
-    QUrl dir = QUrl::fromLocalFile(config->group("receive").readEntry("path", KGlobalSettings::downloadPath()));
+    const QString downloadPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
+    QUrl dir = QUrl::fromLocalFile(config->group("receive").readEntry("path", downloadPath));
 
     if (!dir.path().endsWith('/')) {
         dir.setPath(dir.path() + '/');

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list