Removed unused includes and fixed indentation in some lines
This commit is contained in:
parent
da1347aaa1
commit
9a0d110769
5 changed files with 11 additions and 13 deletions
|
@ -44,15 +44,15 @@ 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() << "WARNING: Device uses a different protocol version" << protocolVersion << "expected" << NetworkPackage::ProtocolVersion;
|
||||
//TODO: Do something
|
||||
}
|
||||
int protocolVersion = identityPackage.get<int>("protocolVersion");
|
||||
if (protocolVersion != NetworkPackage::ProtocolVersion) {
|
||||
qDebug() << "WARNING: Device uses a different protocol version" << protocolVersion << "expected" << NetworkPackage::ProtocolVersion;
|
||||
//TODO: Do something
|
||||
}
|
||||
|
||||
addLink(dl);
|
||||
|
||||
m_pairStatus = Device::Device::NotPaired;
|
||||
m_pairStatus = Device::NotPaired;
|
||||
|
||||
//Register in bus
|
||||
QDBusConnection::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors);
|
||||
|
|
|
@ -118,9 +118,9 @@ bool NetworkPackage::decrypt (QCA::PrivateKey& key, NetworkPackage* out) const
|
|||
QByteArray encryptedChunk = QByteArray::fromBase64(chunk.toAscii());
|
||||
QCA::SecureArray decryptedChunk;
|
||||
bool success = key.decrypt(encryptedChunk, &decryptedChunk, NetworkPackage::EncryptionAlgorithm);
|
||||
if (!success) {
|
||||
return false;
|
||||
}
|
||||
if (!success) {
|
||||
return false;
|
||||
}
|
||||
decryptedJson.append(decryptedChunk.toByteArray());
|
||||
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
#define PACKAGE_TYPE_IDENTITY QString("kdeconnect.identity")
|
||||
#define PACKAGE_TYPE_PAIR QString("kdeconnect.pair")
|
||||
#define PACKAGE_TYPE_PING QString("kdeconnect.ping")
|
||||
#define PACKAGE_TYPE_ENCRYPTED QString("kdeconnect.encrypted")
|
||||
#define PACKAGE_TYPE_PING QString("kdeconnect.ping")
|
||||
#define PACKAGE_TYPE_NOTIFICATION QString("kdeconnect.notification")
|
||||
#define PACKAGE_TYPE_BATTERY QString("kdeconnect.battery")
|
||||
#define PACKAGE_TYPE_TELEPHONY QString("kdeconnect.telephony")
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "propertiesdbusinterface.h"
|
||||
|
||||
#include <QDBusArgument>
|
||||
#include <QDebug>
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusInterface>
|
||||
|
|
|
@ -21,13 +21,10 @@
|
|||
#ifndef MPRISCONTROLPLUGIN_H
|
||||
#define MPRISCONTROLPLUGIN_H
|
||||
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
#include <QHash>
|
||||
#include <QDBusArgument>
|
||||
|
||||
#include "../kdeconnectplugin.h"
|
||||
#include "mprisdbusinterface.h"
|
||||
|
||||
class MprisControlPlugin
|
||||
: public KdeConnectPlugin
|
||||
|
|
Loading…
Reference in a new issue