[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdeconnect-kde/filetransfer-debug] kded: Device class now stores the protocolVersion of the device
From: Albert Vaca <albertvaka () gmail ! com>
Date: 2013-10-01 1:18:43
Message-ID: E1VQobr-00064T-J5 () scm ! kde ! org
[Download RAW message or body]
Git commit 4363ea8fdb0cd2c10324b9cbe32496969154a969 by Albert Vaca.
Committed on 30/09/2013 at 23:09.
Pushed by albertvaka into branch 'filetransfer-debug'.
Device class now stores the protocolVersion of the device
M +3 -4 kded/device.cpp
M +2 -0 kded/device.h
http://commits.kde.org/kdeconnect-kde/4363ea8fdb0cd2c10324b9cbe32496969154a969
diff --git a/kded/device.cpp b/kded/device.cpp
index 4c9712b..035d3a2 100644
--- a/kded/device.cpp
+++ b/kded/device.cpp
@@ -44,10 +44,9 @@ Device::Device(const NetworkPackage& identityPackage, DeviceLink* \
dl) m_deviceId = identityPackage.get<QString>("deviceId");
m_deviceName = identityPackage.get<QString>("deviceName");
- int protocolVersion = identityPackage.get<int>("protocolVersion");
- if (protocolVersion != NetworkPackage::ProtocolVersion) {
- qDebug() << m_deviceName << "- warning, device uses a different protocol \
version" << protocolVersion << "expected" << \
NetworkPackage::ProtocolVersion;
- //TODO: Do something
+ m_protocolVersion = identityPackage.get<int>("protocolVersion");
+ if (m_protocolVersion != NetworkPackage::ProtocolVersion) {
+ qWarning() << m_deviceName << "- warning, device uses a different protocol \
version" << m_protocolVersion << "expected" << NetworkPackage::ProtocolVersion; }
addLink(dl);
diff --git a/kded/device.h b/kded/device.h
index 04f4462..ea87dea 100644
--- a/kded/device.h
+++ b/kded/device.h
@@ -102,10 +102,12 @@ Q_SIGNALS:
Q_SCRIPTABLE void unpaired();
private:
+ //TODO: Replace device id by public key
QString m_deviceId;
QString m_deviceName;
QCA::PublicKey m_publicKey;
PairStatus m_pairStatus;
+ int m_protocolVersion;
QList<DeviceLink*> m_deviceLinks;
QMap<QString, KdeConnectPlugin*> m_plugins;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic