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

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


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

The following commit has been merged in the master branch:
commit d823acc32b45623893ffda6179e81b69f5ba2b69
Author: Kai Uwe Broulik <kde at privat.broulik.de>
Date:   Fri Dec 27 00:29:04 2013 +0100

    Use xdg Download folder instead of Desktop folder as default location for the share plugin
    
    REVIEW: 114677
---
 kded/plugins/share/share_config.cpp | 10 ++++------
 kded/plugins/share/shareplugin.cpp  |  4 ++--
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/kded/plugins/share/share_config.cpp b/kded/plugins/share/share_config.cpp
index 45a90df..55d2f51 100644
--- a/kded/plugins/share/share_config.cpp
+++ b/kded/plugins/share/share_config.cpp
@@ -20,11 +20,10 @@
 
 #include "share_config.h"
 
-#include <QDesktopServices>
-
+#include <KConfigGroup>
+#include <KGlobalSettings>
 #include <KPluginFactory>
 #include <KSharedConfig>
-#include <KConfigGroup>
 #include <KUrlRequester>
 
 #include "../../kdebugnamespace.h"
@@ -53,8 +52,7 @@ void ShareConfig::defaults()
 {
     KCModule::defaults();
 
-    //TODO: Set this to the user's xdg download dir
-    m_ui->kurlrequester->setUrl(KUrl(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation)));
+    m_ui->kurlrequester->setUrl(KGlobalSettings::downloadPath());
 
     Q_EMIT changed(true);
 }
@@ -64,7 +62,7 @@ void ShareConfig::load()
 {
     KCModule::load();
 
-    m_ui->kurlrequester->setUrl(m_cfg->group("receive").readEntry("path", QDesktopServices::storageLocation(QDesktopServices::DesktopLocation)));
+    m_ui->kurlrequester->setUrl(m_cfg->group("receive").readEntry("path", KGlobalSettings::downloadPath()));
 
     Q_EMIT changed(false);
 }
diff --git a/kded/plugins/share/shareplugin.cpp b/kded/plugins/share/shareplugin.cpp
index 1cf29c9..a1ecb10 100644
--- a/kded/plugins/share/shareplugin.cpp
+++ b/kded/plugins/share/shareplugin.cpp
@@ -20,6 +20,7 @@
 
 #include "shareplugin.h"
 
+#include <KGlobalSettings>
 #include <KIcon>
 #include <KLocalizedString>
 #include <KStandardDirs>
@@ -46,8 +47,7 @@ SharePlugin::SharePlugin(QObject* parent, const QVariantList& args)
 
 QString SharePlugin::destinationDir()
 {
-    //TODO: Change this for the xdg download user dir
-    QString defaultPath = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
+    QString defaultPath = KGlobalSettings::downloadPath();
 
     //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");

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list