Includes and cmakelists cleanup

This commit is contained in:
Albert Vaca 2013-09-26 17:49:40 +02:00
parent 95ef31acea
commit 2fd082f4a0
15 changed files with 41 additions and 34 deletions

View file

@ -33,8 +33,6 @@
#include <KConfig>
#include <KConfigGroup>
#include <KNotification>
#include <KIcon>
K_PLUGIN_FACTORY(KdeConnectFactory, registerPlugin<Daemon>();)
K_EXPORT_PLUGIN(KdeConnectFactory("kdeconnect", "kdeconnect"))
@ -77,7 +75,8 @@ Daemon::Daemon(QObject *parent, const QList<QVariant>&)
const QStringList& list = known.groupList();
Q_FOREACH(const QString& id, list) {
Device* device = new Device(id);
connect(device, SIGNAL(reachableStatusChanged()), this, SLOT(onDeviceReachableStatusChanged()));
connect(device, SIGNAL(reachableStatusChanged()),
this, SLOT(onDeviceReachableStatusChanged()));
mDevices[id] = device;
Q_EMIT deviceAdded(id);
}
@ -96,6 +95,7 @@ Daemon::Daemon(QObject *parent, const QList<QVariant>&)
setDiscoveryEnabled(true);
}
void Daemon::setDiscoveryEnabled(bool b)
{
//Listen to incomming connections
@ -107,6 +107,7 @@ void Daemon::setDiscoveryEnabled(bool b)
}
}
void Daemon::forceOnNetworkChange()
{
Q_FOREACH (LinkProvider* a, mLinkProviders) {
@ -162,7 +163,7 @@ void Daemon::onDeviceReachableStatusChanged()
Q_EMIT deviceVisibilityChanged(id, device->isReachable());
qDebug() << "Device" << device->name() << "reachable status changed:" << device->isReachable();
//qDebug() << "Device" << device->name() << "reachable status changed:" << device->isReachable();
if (!device->isReachable()) {

View file

@ -10,6 +10,7 @@
#include <KNotification>
#include <KIcon>
#include <QDBusConnection>
#include <QDebug>
#include "plugins/kdeconnectplugin.h"

View file

@ -22,7 +22,6 @@
#define DEVICE_H
#include <QObject>
#include <QDBusConnection>
#include <QString>
#include <QMap>
#include <QSslKey>

View file

@ -30,7 +30,8 @@
#include <KIO/Job>
#include <KSharedPtr>
class FileTransferJob : public KJob
class FileTransferJob
: public KJob
{
Q_OBJECT
@ -52,4 +53,4 @@ private:
};
#endif // FILETRANSFERJOB_H
#endif

View file

@ -2,14 +2,15 @@ find_package(KDE4 REQUIRED)
find_package(QJSON REQUIRED)
find_package(QCA2 REQUIRED)
include(KDE4Defaults)
include_directories(
${QJSON_INCLUDE_DIR}
${QCA2_INCLUDE_DIR}
${KDE4_INCLUDES}
${CMAKE_SOURCE_DIR}
)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
set(kdeconnect_battery_SRCS
batteryplugin.cpp
batterydbusinterface.cpp

View file

@ -2,14 +2,15 @@ find_package(KDE4 REQUIRED)
find_package(QJSON REQUIRED)
find_package(QCA2 REQUIRED)
include(KDE4Defaults)
include_directories(
${QJSON_INCLUDE_DIR}
${QCA2_INCLUDE_DIR}
${KDE4_INCLUDES}
${CMAKE_SOURCE_DIR}
)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
set(kdeconnect_clipboard_SRCS
clipboardplugin.cpp
../kdeconnectplugin.cpp

View file

@ -2,15 +2,15 @@ find_package(KDE4 REQUIRED)
find_package(QJSON REQUIRED)
find_package(QCA2 REQUIRED)
include(KDE4Defaults)
include_directories(
${QJSON_INCLUDE_DIR}
${KIO_INCLUDE_DIR}
${QCA2_INCLUDE_DIR}
${KDE4_INCLUDES}
${CMAKE_SOURCE_DIR}
)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
set(kdeconnect_filetransfer_SRCS
filetransferplugin.cpp
autoclosingqfile.cpp

View file

@ -20,8 +20,6 @@
#include "kdeconnectplugin.h"
#include <QPointer>
#include "../device.h"
KdeConnectPlugin::KdeConnectPlugin(QObject* parent, const QVariantList& args)

View file

@ -2,14 +2,15 @@ find_package(KDE4 REQUIRED)
find_package(QJSON REQUIRED)
find_package(QCA2 REQUIRED)
include(KDE4Defaults)
include_directories(
${QJSON_INCLUDE_DIR}
${QCA2_INCLUDE_DIR}
${KDE4_INCLUDES}
${CMAKE_SOURCE_DIR}
)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
set(kdeconnect_mpriscontrol_SRCS
mpriscontrolplugin.cpp
../kdeconnectplugin.cpp

View file

@ -2,14 +2,15 @@ find_package(KDE4 REQUIRED)
find_package(QJSON REQUIRED)
find_package(QCA2 REQUIRED)
include(KDE4Defaults)
include_directories(
${QJSON_INCLUDE_DIR}
${QCA2_INCLUDE_DIR}
${KDE4_INCLUDES}
${CMAKE_SOURCE_DIR}
)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
set(kdeconnect_notifications_SRCS
notification.cpp
notificationsplugin.cpp

View file

@ -23,7 +23,7 @@
#include "../../filetransferjob.h"
#include <QDebug>
#include <qdir.h>
#include <QDir>
#include <QDBusConnection>
#include <KNotification>

View file

@ -2,14 +2,15 @@ find_package(KDE4 REQUIRED)
find_package(QJSON REQUIRED)
find_package(QCA2 REQUIRED)
include(KDE4Defaults)
include_directories(
${QJSON_INCLUDE_DIR}
${QCA2_INCLUDE_DIR}
${KDE4_INCLUDES}
${CMAKE_SOURCE_DIR}
)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
set(kdeconnect_pausemusic_SRCS
pausemusicplugin.cpp
../kdeconnectplugin.cpp

View file

@ -23,7 +23,7 @@
#include <QDebug>
#include <QDBusConnection>
#include <QDBusInterface>
#include <qdbusconnectioninterface.h>
#include <QDBusConnectionInterface>
#include <QDBusReply>
#include <QDBusMessage>

View file

@ -2,14 +2,15 @@ find_package(KDE4 REQUIRED)
find_package(QJSON REQUIRED)
find_package(QCA2 REQUIRED)
include(KDE4Defaults)
include_directories(
${QJSON_INCLUDE_DIR}
${QCA2_INCLUDE_DIR}
${KDE4_INCLUDES}
${CMAKE_SOURCE_DIR}
)
include(KDE4Defaults)
include_directories(${KDE4_INCLUDES})
set(kdeconnect_ping_SRCS
pingplugin.cpp
../kdeconnectplugin.cpp

View file

@ -22,8 +22,9 @@
#include "kdeconnectplugin.h"
#include <QDebug>
#include <KServiceTypeTrader>
#include <KDebug>
#include "../device.h"