Commit 8fe51fbe authored by Harald Sitter's avatar Harald Sitter 🦄

cleanup devinfo header includes

Summary:
these were so exhaustive they loop included each other.
move everything that isn't required in a header to their
respective cpp. also clean out clearly unused/unnecessary
includes

should improve compile time a tad and more importantly stop
qtcreator's code model/parser from stumbling over this

Test Plan: builds

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26785
parent 99c7273a
......@@ -21,8 +21,20 @@
#include "devicelisting.h"
//Solid
#include <solid/devicenotifier.h>
#include <QContextMenuEvent>
#include <QMenu>
//Local
#include "infopanel.h"
#include "soldevice.h"
#include "soldevicetypes.h"
#include "devinfo.h"
#include "solidhelper.h"
//#include "nicsignals.h"
DeviceListing::DeviceListing(QWidget *parent, InfoPanel *info, DevInfoPlugin *stat)
: QTreeWidget(parent)
, iPanel(info)
......
......@@ -22,32 +22,20 @@
#ifndef DEVICELISTING
#define DEVICELISTING
//Solid
#include <solid/device.h>
#include <solid/deviceinterface.h>
#include <solid/processor.h>
#include <solid/devicenotifier.h>
//QT
#include <QMap>
#include <QTreeWidget>
#include <QAction>
#include <QContextMenuEvent>
#include <QTreeWidgetItemIterator>
//Local
#include "infopanel.h"
#include "soldevice.h"
#include "soldevicetypes.h"
#include "devinfo.h"
#include "solidhelper.h"
//#include "nicsignals.h"
//Kde
class InfoPanel;
class DevInfoPlugin;
//class NicSignals;
class QContextMenuEvent;
class QAction;
class DeviceListing : public QTreeWidget
{
......
......@@ -20,8 +20,19 @@
*/
#include "devinfo.h"
#include <QGridLayout>
#include <QLabel>
#include <QSplitter>
#include <KLocalizedString>
#include <kaboutdata.h>
//Plugin
#include <kpluginfactory.h>
#include <kpluginloader.h>
#include "devicelisting.h"
#include "infopanel.h"
K_PLUGIN_FACTORY(devInfoModuleFactory, registerPlugin<DevInfoPlugin>();
)
......
......@@ -24,17 +24,9 @@
//kde
#include <kcmodule.h>
#include <kaboutdata.h>
//Plugin
#include <kpluginfactory.h>
#include <kpluginloader.h>
//QT
//Local
#include "devicelisting.h"
#include "infopanel.h"
class QLabel;
class QGridLayout;
class DevInfoPlugin : public KCModule
{
......
......@@ -21,6 +21,15 @@
#include "infopanel.h"
//Solid
#include <solid/device.h>
#include <QLabel>
#include <QIcon>
#include "devinfo.h"
#include "qvlistlayout.h"
InfoPanel::InfoPanel(QWidget *parent, DevInfoPlugin *stat)
: QGroupBox(i18n("Device Information"), parent)
, status(stat)
......
......@@ -23,24 +23,18 @@
#define INFOPANEL
// QT
#include <QWidget>
#include <QGroupBox>
#include <QLabel>
//Solid
#include <solid/device.h>
#include <solid/processor.h>
#include <solid/deviceinterface.h>
#include <solid/storagedrive.h>
//KDE
#include <KLocalizedString>
//Local
#include "qvlistlayout.h"
#include "devinfo.h"
class QVListLayout;
class QLabel;
class DevInfoPlugin;
class QVBoxLayout;
namespace Solid {
class Device;
}
class InfoPanel : public QGroupBox
{
......
......@@ -20,6 +20,10 @@
#include "nicsignals.h"
//KDE
#include <solid/control/networkmanager.h>
#include <solid/control/networkinterface.h>
NicSignals::NicSignals()
{
connectToNicSignals();
......
......@@ -25,10 +25,6 @@
//Qt
#include <QObject>
//KDE
#include <solid/control/networkmanager.h>
#include <solid/control/networkinterface.h>
class NicSignals : public QObject
{
Q_OBJECT
......
......@@ -20,8 +20,16 @@
*/
#include "soldevice.h"
#include <solid/deviceinterface.h>
#include <solid/processor.h>
#include <QTreeWidget>
#include <KLocalizedString>
// Con
// Local
#include "qvlistlayout.h"
SolDevice::SolDevice(const Solid::DeviceInterface::Type &type)
: QTreeWidgetItem()
......
......@@ -24,25 +24,12 @@
//QT
#include <QTreeWidgetItem>
#include <QTreeWidget>
#include <QDebug>
//Solid
#include <solid/device.h>
#include <solid/deviceinterface.h>
#include <solid/processor.h>
#include <solid/storagedrive.h>
#include <solid/storagevolume.h>
#include <solid/storageaccess.h>
#include <solid/portablemediaplayer.h>
#include <solid/camera.h>
#include <solid/battery.h>
#include <solid/predicate.h>
//KDE
// Local
#include "qvlistlayout.h"
class QVListLayout;
......
......@@ -21,11 +21,24 @@
#include "soldevicetypes.h"
#include <solid/deviceinterface.h>
#include <solid/processor.h>
#include <solid/storagedrive.h>
#include <solid/storagevolume.h>
#include <solid/storageaccess.h>
#include <solid/portablemediaplayer.h>
#include <solid/camera.h>
#include <solid/battery.h>
#include <QProgressBar>
//kde
#include <kdiskfreespaceinfo.h>
#include <kcapacitybar.h>
#include <KFormat>
#include "qvlistlayout.h"
// ---- Processor
SolProcessorDevice::SolProcessorDevice(QTreeWidgetItem *parent, const Solid::Device &device)
......
......@@ -22,9 +22,6 @@
#ifndef SOLDEVICETYPES
#define SOLDEVICETYPES
//kde
#include <kdiskfreespaceinfo.h>
#include "soldevice.h"
#include "infopanel.h"
......@@ -103,4 +100,4 @@ private:
void setDefaultListing(const Solid::DeviceInterface::Type &) override;
};
#endif //SOLDEVICETYPES
#endif //
......@@ -21,6 +21,9 @@
#include "solidhelper.h"
//Solid
#include <solid/device.h>
Solid::DeviceInterface::Type SolidHelper::deviceType(const Solid::Device *dev)
{
const Solid::DeviceInterface::Type needHardware[] = {
......
......@@ -23,7 +23,7 @@
#define SOLIDHELPER
//Solid
#include <solid/device.h>
#include <solid/deviceinterface.h>
class SolidHelper
{
......
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