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

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


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

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

    Port core from KStandardDirs to QStandardPaths
    
    Tested, both code return the same thing.
---
 core/daemon.cpp | 4 ++--
 core/device.cpp | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/core/daemon.cpp b/core/daemon.cpp
index 614107d..b0305ef 100644
--- a/core/daemon.cpp
+++ b/core/daemon.cpp
@@ -27,10 +27,10 @@
 #include <QNetworkSession>
 #include <QNetworkConfigurationManager>
 #include <QtCrypto>
+#include <QStandardPaths>
 
 #include <KConfig>
 #include <KConfigGroup>
-#include <KStandardDirs>
 
 #include "core_debug.h"
 #include "networkpackage.h"
@@ -81,7 +81,7 @@ Daemon::Daemon(QObject *parent)
     const QFile::Permissions strict = QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::WriteUser;
     if (!config->group("myself").hasKey("privateKeyPath"))
     {
-        const QString privateKeyPath = KStandardDirs::locateLocal("appdata", "key.pem", true);
+        const QString privateKeyPath = QStandardPaths::locate(QStandardPaths::QStandardPaths::DataLocation, QStringLiteral("key.pem"));
 
         QFile privKey(privateKeyPath);
 
diff --git a/core/device.cpp b/core/device.cpp
index f427a9c..039a991 100644
--- a/core/device.cpp
+++ b/core/device.cpp
@@ -26,10 +26,10 @@
 
 #include <QDBusConnection>
 #include <QFile>
+#include <QStandardPaths>
 
 #include <KSharedConfig>
 #include <KConfigGroup>
-#include <KStandardDirs>
 #include <KPluginSelector>
 #include <KServiceTypeTrader>
 #include <KNotification>
@@ -86,7 +86,8 @@ Device::Device(QObject* parent, const NetworkPackage& identityPackage, DeviceLin
 void Device::initPrivateKey()
 {
     //TODO: It is redundant to have our own private key in every instance of Device, move this to a singleton somewhere (Daemon?)
-    const QString privateKeyPath = KStandardDirs::locateLocal("appdata", "key.pem", true);
+    const QString privateKeyPath = QStandardPaths::locate(QStandardPaths::QStandardPaths::DataLocation, QStringLiteral("key.pem"));
+
     QFile privKey(privateKeyPath);
     if (privKey.open(QIODevice::ReadOnly))
         m_privateKey = QCA::PrivateKey::fromPEM(privKey.readAll());
@@ -120,7 +121,7 @@ void Device::reloadPlugins()
 
     if (isPaired() && isReachable()) { //Do not load any plugin for unpaired devices, nor useless loading them for unreachable devices
 
-        QString path = KGlobal::dirs()->findResource("config", "kdeconnect/"+id());
+        QString path = QStandardPaths::locate(QStandardPaths::ConfigLocation, "kdeconnect/", QStandardPaths::LocateDirectory) + id();
         KConfigGroup pluginStates = KSharedConfig::openConfig(path)->group("Plugins");
 
         PluginLoader* loader = PluginLoader::instance();

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list