Commit 9a0d1107 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Removed unused includes and fixed indentation in some lines

parent da1347aa
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment