[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:27:29 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=30c028b
The following commit has been merged in the master branch:
commit 30c028b6cd79b949832c59abdf31fda365ee5635
Author: Àlex Fiestas <afiestas at kde.org>
Date: Tue Mar 4 02:34:09 2014 +0100
Added const all around
---
kded/networkpackage.cpp | 8 ++++----
kded/plugins/telephony/telephonyplugin.cpp | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/kded/networkpackage.cpp b/kded/networkpackage.cpp
index 72c54e5..e027f50 100644
--- a/kded/networkpackage.cpp
+++ b/kded/networkpackage.cpp
@@ -49,7 +49,7 @@ NetworkPackage::NetworkPackage(const QString& type)
void NetworkPackage::createIdentityPackage(NetworkPackage* np)
{
KSharedConfigPtr config = KSharedConfig::openConfig("kdeconnectrc");
- QString id = config->group("myself").readEntry<QString>("id","");
+ const QString id = config->group("myself").readEntry<QString>("id","");
np->mId = QString::number(QDateTime::currentMSecsSinceEpoch());
np->mType = PACKAGE_TYPE_IDENTITY;
np->mPayload = QSharedPointer<QIODevice>();
@@ -130,9 +130,9 @@ void NetworkPackage::encrypt(QCA::PublicKey& key)
QStringList chunks;
while (!serialized.isEmpty()) {
- QByteArray chunk = serialized.left(chunkSize);
+ const QByteArray chunk = serialized.left(chunkSize);
serialized = serialized.mid(chunkSize);
- QByteArray encryptedChunk = key.encrypt(chunk, NetworkPackage::EncryptionAlgorithm).toByteArray();
+ const QByteArray encryptedChunk = key.encrypt(chunk, NetworkPackage::EncryptionAlgorithm).toByteArray();
chunks.append( encryptedChunk.toBase64() );
}
@@ -152,7 +152,7 @@ bool NetworkPackage::decrypt(QCA::PrivateKey& key, NetworkPackage* out) const
QByteArray decryptedJson;
Q_FOREACH(const QString& chunk, chunks) {
- QByteArray encryptedChunk = QByteArray::fromBase64(chunk.toAscii());
+ const QByteArray encryptedChunk = QByteArray::fromBase64(chunk.toAscii());
QCA::SecureArray decryptedChunk;
bool success = key.decrypt(encryptedChunk, &decryptedChunk, NetworkPackage::EncryptionAlgorithm);
if (!success) {
diff --git a/kded/plugins/telephony/telephonyplugin.cpp b/kded/plugins/telephony/telephonyplugin.cpp
index b38025e..9a0740d 100644
--- a/kded/plugins/telephony/telephonyplugin.cpp
+++ b/kded/plugins/telephony/telephonyplugin.cpp
@@ -37,12 +37,12 @@ TelephonyPlugin::TelephonyPlugin(QObject *parent, const QVariantList &args)
KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
{
- QString event = np.get<QString>("event");
- QString phoneNumber = np.get<QString>("phoneNumber", i18n("unknown number"));
+ const QString event = np.get<QString>("event");
+ const QString phoneNumber = np.get<QString>("phoneNumber", i18n("unknown number"));
- QString title, content, type, icon;
+ QString content, type, icon;
- title = device()->name();
+ const QString title = device()->name();
if (event == "ringing") {
type = "callReceived";
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list