From 8548ebd03290321218207b249f3128966d79877c Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Sun, 3 Feb 2019 01:44:22 +0100 Subject: [PATCH] Clean up includes --- app/main.cpp | 3 ++- core/backends/bluetooth/bluetoothdevicelink.h | 2 +- core/backends/bluetooth/bluetoothlinkprovider.h | 14 +++++++------- .../backends/bluetooth/bluetoothpairinghandler.cpp | 3 ++- core/backends/lan/landevicelink.cpp | 3 ++- core/backends/lan/lanpairinghandler.cpp | 3 ++- declarativeplugin/kdeconnectdeclarativeplugin.cpp | 1 - interfaces/conversationmessage.cpp | 1 - interfaces/modeltest.cpp | 2 -- plugins/contacts/contactsplugin.cpp | 2 +- plugins/mprisremote/mprisremoteplayer.cpp | 5 +++-- plugins/mprisremote/mprisremoteplayer.h | 2 ++ .../sendnotifications/notificationslistener.cpp | 2 +- smsapp/main.cpp | 1 - 14 files changed, 23 insertions(+), 21 deletions(-) diff --git a/app/main.cpp b/app/main.cpp index fd31cffc1..70391c710 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -21,10 +21,11 @@ #include #include #include +#include + #include #include #include -#include int main(int argc, char* argv[]) { diff --git a/core/backends/bluetooth/bluetoothdevicelink.h b/core/backends/bluetooth/bluetoothdevicelink.h index 593262df5..7a10f9f54 100644 --- a/core/backends/bluetooth/bluetoothdevicelink.h +++ b/core/backends/bluetooth/bluetoothdevicelink.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include "../devicelink.h" #include "../devicelinereader.h" diff --git a/core/backends/bluetooth/bluetoothlinkprovider.h b/core/backends/bluetooth/bluetoothlinkprovider.h index ccdc6a35a..1875e95bc 100644 --- a/core/backends/bluetooth/bluetoothlinkprovider.h +++ b/core/backends/bluetooth/bluetoothlinkprovider.h @@ -24,13 +24,13 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "../linkprovider.h" diff --git a/core/backends/bluetooth/bluetoothpairinghandler.cpp b/core/backends/bluetooth/bluetoothpairinghandler.cpp index 1c8563189..637cbb45c 100644 --- a/core/backends/bluetooth/bluetoothpairinghandler.cpp +++ b/core/backends/bluetooth/bluetoothpairinghandler.cpp @@ -18,12 +18,13 @@ * along with this program. If not, see . */ +#include "bluetoothpairinghandler.h" + #include #include "core_debug.h" #include "daemon.h" #include "kdeconnectconfig.h" -#include "bluetoothpairinghandler.h" #include "networkpackettypes.h" BluetoothPairingHandler::BluetoothPairingHandler(DeviceLink* deviceLink) diff --git a/core/backends/lan/landevicelink.cpp b/core/backends/lan/landevicelink.cpp index e88e1e3c7..c6b413fac 100644 --- a/core/backends/lan/landevicelink.cpp +++ b/core/backends/lan/landevicelink.cpp @@ -18,9 +18,10 @@ * along with this program. If not, see . */ +#include "landevicelink.h" + #include -#include "landevicelink.h" #include "core_debug.h" #include "kdeconnectconfig.h" #include "backends/linkprovider.h" diff --git a/core/backends/lan/lanpairinghandler.cpp b/core/backends/lan/lanpairinghandler.cpp index 257f2e0be..7d8eaae45 100644 --- a/core/backends/lan/lanpairinghandler.cpp +++ b/core/backends/lan/lanpairinghandler.cpp @@ -18,13 +18,14 @@ * along with this program. If not, see . */ +#include "lanpairinghandler.h" + #include #include "core_debug.h" #include "daemon.h" #include "kdeconnectconfig.h" #include "landevicelink.h" -#include "lanpairinghandler.h" #include "networkpackettypes.h" LanPairingHandler::LanPairingHandler(DeviceLink* deviceLink) diff --git a/declarativeplugin/kdeconnectdeclarativeplugin.cpp b/declarativeplugin/kdeconnectdeclarativeplugin.cpp index c4c1379f7..aec3b0a77 100644 --- a/declarativeplugin/kdeconnectdeclarativeplugin.cpp +++ b/declarativeplugin/kdeconnectdeclarativeplugin.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include "objectfactory.h" #include "responsewaiter.h" diff --git a/interfaces/conversationmessage.cpp b/interfaces/conversationmessage.cpp index 0690a03d2..2fb2cb884 100644 --- a/interfaces/conversationmessage.cpp +++ b/interfaces/conversationmessage.cpp @@ -20,7 +20,6 @@ #include "conversationmessage.h" -#include #include diff --git a/interfaces/modeltest.cpp b/interfaces/modeltest.cpp index 9fb6d998d..1494349c3 100644 --- a/interfaces/modeltest.cpp +++ b/interfaces/modeltest.cpp @@ -23,8 +23,6 @@ #include "modeltest.h" -#include - Q_DECLARE_METATYPE(QModelIndex) /*! diff --git a/plugins/contacts/contactsplugin.cpp b/plugins/contacts/contactsplugin.cpp index 2e5176b40..2e8dad9b4 100644 --- a/plugins/contacts/contactsplugin.cpp +++ b/plugins/contacts/contactsplugin.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include diff --git a/plugins/mprisremote/mprisremoteplayer.cpp b/plugins/mprisremote/mprisremoteplayer.cpp index cf520d7bd..95b552573 100644 --- a/plugins/mprisremote/mprisremoteplayer.cpp +++ b/plugins/mprisremote/mprisremoteplayer.cpp @@ -18,10 +18,11 @@ * along with this program. If not, see . */ -#include +#include "mprisremoteplayer.h" + #include -#include "mprisremoteplayer.h" +#include MprisRemotePlayer::MprisRemotePlayer() : m_playing(false) diff --git a/plugins/mprisremote/mprisremoteplayer.h b/plugins/mprisremote/mprisremoteplayer.h index 5cb4a6ae5..34c131a2d 100644 --- a/plugins/mprisremote/mprisremoteplayer.h +++ b/plugins/mprisremote/mprisremoteplayer.h @@ -21,6 +21,8 @@ #include +class NetworkPacket; + class MprisRemotePlayer { public: diff --git a/plugins/sendnotifications/notificationslistener.cpp b/plugins/sendnotifications/notificationslistener.cpp index b87d951ce..a12f99ad6 100644 --- a/plugins/sendnotifications/notificationslistener.cpp +++ b/plugins/sendnotifications/notificationslistener.cpp @@ -17,6 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#include "notificationslistener.h" #include #include @@ -33,7 +34,6 @@ #include #include -#include "notificationslistener.h" #include "sendnotificationsplugin.h" #include "sendnotification_debug.h" #include "notifyingapplication.h" diff --git a/smsapp/main.cpp b/smsapp/main.cpp index 05de63177..01209f6e0 100644 --- a/smsapp/main.cpp +++ b/smsapp/main.cpp @@ -31,7 +31,6 @@ #include #include #include -#include int main(int argc, char *argv[]) {