diff --git a/kded/device.cpp b/kded/device.cpp index 5b4ae5d75..ce31ae574 100644 --- a/kded/device.cpp +++ b/kded/device.cpp @@ -1,5 +1,32 @@ +/** + * Copyright 2013 Albert Vaca + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "device.h" +#ifdef interface // MSVC language extension, QDBusConnection uses this as a variable name +#undef interface +#endif + +#include +#include + #include #include #include @@ -15,12 +42,6 @@ #include "backends/linkprovider.h" #include "networkpackage.h" -#ifdef interface // MSVC language extension, QDBusConnection uses this as a variable name -#undef interface -#endif -#include -#include - Device::Device(QObject* parent, const QString& id) : QObject(parent) , m_deviceId(id) @@ -36,7 +57,7 @@ Device::Device(QObject* parent, const QString& id) const QString& key = data.readEntry("publicKey", QString()); m_publicKey = QCA::RSAPublicKey::fromPEM(key); - //TODO: It is redundant to have our own private key in every instance of Device, move this to a signleton somewhere (Daemon?) + //TODO: It is redundant to have our own private key in every instance of Device, move this to a singleton somewhere (Daemon?) const QString privateKeyPath = KStandardDirs::locateLocal("appdata", "key.pem", true, KComponentData("kdeconnect", "kdeconnect")); QFile privKey(privateKeyPath); privKey.open(QIODevice::ReadOnly); @@ -54,7 +75,7 @@ Device::Device(QObject* parent, const NetworkPackage& identityPackage, DeviceLin , m_pairStatus(Device::NotPaired) , m_protocolVersion(identityPackage.get("protocolVersion")) { - //TODO: It is redundant to have our own private key in every instance of Device, move this to a signleton somewhere (Daemon?) + //TODO: It is redundant to have our own private key in every instance of Device, move this to a singleton somewhere (Daemon?) const QString privateKeyPath = KStandardDirs::locateLocal("appdata", "key.pem", true, KComponentData("kdeconnect", "kdeconnect")); QFile privKey(privateKeyPath); privKey.open(QIODevice::ReadOnly);