[SCM] kdeconnect packaging branch, master, updated. upstream/1.0.1-206-gf661872

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 18:27:11 UTC 2017


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

The following commit has been merged in the master branch:
commit b7bb8d94c5412d64cb2c07d8fedf21343de0fb72
Author: Albert Vaca <albertvaka at gmail.com>
Date:   Sat Nov 26 16:09:40 2016 +0100

    Fixed QStrings not being passed by ref
---
 core/filetransferjob.h    | 2 +-
 core/kdeconnectconfig.cpp | 6 +++---
 core/kdeconnectconfig.h   | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/core/filetransferjob.h b/core/filetransferjob.h
index ab8368d..a94b38c 100644
--- a/core/filetransferjob.h
+++ b/core/filetransferjob.h
@@ -52,7 +52,7 @@ public:
     FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64 size, const QUrl &destination);
     void start() override;
     QUrl destination() const { return mDestination; }
-    void setOriginName(QString from) { mFrom = from; }
+    void setOriginName(const QString& from) { mFrom = from; }
 
 private Q_SLOTS:
     void doStart();
diff --git a/core/kdeconnectconfig.cpp b/core/kdeconnectconfig.cpp
index 2dd3415..4041cea 100644
--- a/core/kdeconnectconfig.cpp
+++ b/core/kdeconnectconfig.cpp
@@ -156,7 +156,7 @@ QString KdeConnectConfig::name()
     return name;
 }
 
-void KdeConnectConfig::setName(QString name)
+void KdeConnectConfig::setName(const QString& name)
 {
     d->config->setValue(QStringLiteral("name"), name);
     d->config->sync();
@@ -243,7 +243,7 @@ void KdeConnectConfig::removeTrustedDevice(const QString &deviceId)
 }
 
 // Utility functions to set and get a value
-void KdeConnectConfig::setDeviceProperty(QString deviceId, QString key, QString value)
+void KdeConnectConfig::setDeviceProperty(const QString& deviceId, const QString& key, const QString& value)
 {
     d->trusted_devices->beginGroup(deviceId);
     d->trusted_devices->setValue(key, value);
@@ -251,7 +251,7 @@ void KdeConnectConfig::setDeviceProperty(QString deviceId, QString key, QString
     d->trusted_devices->sync();
 }
 
-QString KdeConnectConfig::getDeviceProperty(QString deviceId, QString key, QString defaultValue)
+QString KdeConnectConfig::getDeviceProperty(const QString& deviceId, const QString& key, const QString& defaultValue)
 {
     QString value;
     d->trusted_devices->beginGroup(deviceId);
diff --git a/core/kdeconnectconfig.h b/core/kdeconnectconfig.h
index 9a6e7f5..8ed4c1b 100644
--- a/core/kdeconnectconfig.h
+++ b/core/kdeconnectconfig.h
@@ -56,7 +56,7 @@ public:
     QString certificatePath();
     QSslCertificate certificate();
 
-    void setName(QString name);
+    void setName(const QString& name);
 
     /*
      * Trusted devices
@@ -67,8 +67,8 @@ public:
     void addTrustedDevice(const QString &id, const QString &name, const QString &type);
     KdeConnectConfig::DeviceInfo getTrustedDevice(const QString &id);
 
-    void setDeviceProperty(QString deviceId, QString name, QString value);
-    QString getDeviceProperty(QString deviceId, QString name, QString defaultValue = QString());
+    void setDeviceProperty(const QString& deviceId, const QString& name, const QString& value);
+    QString getDeviceProperty(const QString& deviceId, const QString& name, const QString& defaultValue = QString());
 
     /*
      * Paths for config files, there is no guarantee the directories already exist

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list