From a721a971a222021d95340b6d45b3ac374f7034dc Mon Sep 17 00:00:00 2001 From: Aaron Rainbolt Date: Sat, 2 Dec 2023 23:56:15 -0600 Subject: [PATCH] Totally reorganize header includes to improve compilation speed --- connectionsettingsengine.cpp | 18 ++++++++++++++++++ connectionsettingsengine.h | 17 ----------------- ethernetsettings.cpp | 6 ++++++ ethernetsettings.h | 13 ++++++------- ethernetsettingstab.cpp | 1 + ethernetsettingstab.h | 1 - generalsettingstab.cpp | 4 ++++ generalsettingstab.h | 6 +----- ipv4settingstab.cpp | 3 +++ ipv4settingstab.h | 3 --- ipv6settingstab.cpp | 3 +++ ipv6settingstab.h | 4 +--- listeditordialog.cpp | 4 ++++ listeditordialog.h | 4 ---- main.cpp | 4 ++-- networkcreator.cpp | 9 +++++++++ networkcreator.h | 9 --------- networkdeleter.cpp | 9 +++++++++ networkdeleter.h | 10 ++-------- networkselector.cpp | 16 +++++++++++++++- networkselector.h | 18 +++--------------- security802_1xtab.cpp | 3 +++ security802_1xtab.h | 2 -- wifisettings.cpp | 7 ++++++- wifisettings.h | 10 ++++------ wifisettingstab.cpp | 5 ++++- wifisettingstab.h | 2 -- 27 files changed, 104 insertions(+), 87 deletions(-) diff --git a/connectionsettingsengine.cpp b/connectionsettingsengine.cpp index f7a39a2..a581c97 100644 --- a/connectionsettingsengine.cpp +++ b/connectionsettingsengine.cpp @@ -1,5 +1,23 @@ #include "connectionsettingsengine.h" +#include "qvarianthelper.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include QString ConnectionSettingsEngine::targetConnUuidStr = QString(); diff --git a/connectionsettingsengine.h b/connectionsettingsengine.h index b7f7f9f..3051acd 100644 --- a/connectionsettingsengine.h +++ b/connectionsettingsengine.h @@ -1,25 +1,8 @@ #ifndef CONNECTIONSETTINGSENGINE_H #define CONNECTIONSETTINGSENGINE_H -#include "qvarianthelper.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include -#include -#include class ConnectionSettingsEngine { diff --git a/ethernetsettings.cpp b/ethernetsettings.cpp index 079ac3f..1d7bd2f 100644 --- a/ethernetsettings.cpp +++ b/ethernetsettings.cpp @@ -1,4 +1,10 @@ +#include "connectionsettingsengine.h" #include "ethernetsettings.h" +#include "ethernetsettingstab.h" +#include "generalsettingstab.h" +#include "ipv4settingstab.h" +#include "ipv6settingstab.h" +#include "security802_1xtab.h" #include "ui_genericsettings.h" EthernetSettings::EthernetSettings(QString connUuidStr, QWidget *parent) : diff --git a/ethernetsettings.h b/ethernetsettings.h index ab2c191..83dd848 100644 --- a/ethernetsettings.h +++ b/ethernetsettings.h @@ -1,19 +1,18 @@ #ifndef ETHERNETSETTINGS_H #define ETHERNETSETTINGS_H -#include "connectionsettingsengine.h" -#include "generalsettingstab.h" -#include "ethernetsettingstab.h" -#include "security802_1xtab.h" -#include "ipv4settingstab.h" -#include "ipv6settingstab.h" - #include namespace Ui { class GenericSettings; } +class GeneralSettingsTab; +class EthernetSettingsTab; +class Security802_1xTab; +class Ipv4SettingsTab; +class Ipv6SettingsTab; + class EthernetSettings : public QDialog { Q_OBJECT diff --git a/ethernetsettingstab.cpp b/ethernetsettingstab.cpp index cf7cf8f..9267b58 100644 --- a/ethernetsettingstab.cpp +++ b/ethernetsettingstab.cpp @@ -1,3 +1,4 @@ +#include "connectionsettingsengine.h" #include "ethernetsettingstab.h" #include "ui_ethernetsettingstab.h" diff --git a/ethernetsettingstab.h b/ethernetsettingstab.h index 22aecd2..8c5010b 100644 --- a/ethernetsettingstab.h +++ b/ethernetsettingstab.h @@ -1,7 +1,6 @@ #ifndef ETHERNETSETTINGSTAB_H #define ETHERNETSETTINGSTAB_H -#include "connectionsettingsengine.h" #include namespace Ui { diff --git a/generalsettingstab.cpp b/generalsettingstab.cpp index 46d15e1..389b1c7 100644 --- a/generalsettingstab.cpp +++ b/generalsettingstab.cpp @@ -1,6 +1,10 @@ +#include "connectionsettingsengine.h" #include "generalsettingstab.h" #include "ui_generalsettingstab.h" +#include +#include + GeneralSettingsTab::GeneralSettingsTab(QWidget *parent) : QWidget(parent), ui(new Ui::GeneralSettingsTab) diff --git a/generalsettingstab.h b/generalsettingstab.h index b57b7b7..2143aac 100644 --- a/generalsettingstab.h +++ b/generalsettingstab.h @@ -1,12 +1,8 @@ #ifndef GENERALSETTINGSTAB_H #define GENERALSETTINGSTAB_H -#include "connectionsettingsengine.h" -#include -#include -#include -#include #include +#include namespace Ui { class GeneralSettingsTab; diff --git a/ipv4settingstab.cpp b/ipv4settingstab.cpp index d471b46..8c917d7 100644 --- a/ipv4settingstab.cpp +++ b/ipv4settingstab.cpp @@ -1,4 +1,7 @@ +#include "connectionsettingsengine.h" #include "ipv4settingstab.h" +#include "listeditordialog.h" +#include "qvarianthelper.h" #include "ui_ipv4settingstab.h" Ipv4SettingsTab::Ipv4SettingsTab(QWidget *parent) : diff --git a/ipv4settingstab.h b/ipv4settingstab.h index d1beda7..4fd6718 100644 --- a/ipv4settingstab.h +++ b/ipv4settingstab.h @@ -1,9 +1,6 @@ #ifndef IPV4SETTINGSTAB_H #define IPV4SETTINGSTAB_H -#include "qvarianthelper.h" -#include "connectionsettingsengine.h" -#include "listeditordialog.h" #include namespace Ui { diff --git a/ipv6settingstab.cpp b/ipv6settingstab.cpp index 9434977..1a02580 100644 --- a/ipv6settingstab.cpp +++ b/ipv6settingstab.cpp @@ -1,4 +1,7 @@ +#include "connectionsettingsengine.h" #include "ipv6settingstab.h" +#include "listeditordialog.h" +#include "qvarianthelper.h" #include "ui_ipv6settingstab.h" Ipv6SettingsTab::Ipv6SettingsTab(QWidget *parent) : diff --git a/ipv6settingstab.h b/ipv6settingstab.h index a076144..3c13c4a 100644 --- a/ipv6settingstab.h +++ b/ipv6settingstab.h @@ -1,9 +1,7 @@ #ifndef IPV6SETTINGSTAB_H #define IPV6SETTINGSTAB_H -#include "qvarianthelper.h" -#include "connectionsettingsengine.h" -#include "listeditordialog.h" +#include #include namespace Ui { diff --git a/listeditordialog.cpp b/listeditordialog.cpp index 62a85e4..eef6799 100644 --- a/listeditordialog.cpp +++ b/listeditordialog.cpp @@ -1,6 +1,10 @@ #include "listeditordialog.h" #include "ui_listeditordialog.h" +#include +#include +#include + ListEditorDialog::ListEditorDialog(QWidget *parent, QString listStr, QChar separator) : QDialog(parent), ui(new Ui::ListEditorDialog) diff --git a/listeditordialog.h b/listeditordialog.h index 488e3f0..8907524 100644 --- a/listeditordialog.h +++ b/listeditordialog.h @@ -2,10 +2,6 @@ #define LISTEDITORDIALOG_H #include -#include -#include -#include -#include namespace Ui { class ListEditorDialog; diff --git a/main.cpp b/main.cpp index 2c11c04..5376539 100644 --- a/main.cpp +++ b/main.cpp @@ -1,10 +1,10 @@ #include "networkselector.h" #include +#include +#include #include #include -#include -#include int main(int argc, char *argv[]) { diff --git a/networkcreator.cpp b/networkcreator.cpp index 31918d8..e679b1e 100644 --- a/networkcreator.cpp +++ b/networkcreator.cpp @@ -1,6 +1,15 @@ #include "networkcreator.h" #include "ui_networkcreator.h" + +#include +#include +#include +#include +#include +#include #include +#include +#include NetworkCreator::NetworkCreator(QWidget *parent) : QDialog(parent), diff --git a/networkcreator.h b/networkcreator.h index b9d602a..7db7dfd 100644 --- a/networkcreator.h +++ b/networkcreator.h @@ -2,15 +2,6 @@ #define NETWORKCREATOR_H #include -#include -#include -#include -#include -#include -#include -#include -#include -#include namespace Ui { class NetworkCreator; diff --git a/networkdeleter.cpp b/networkdeleter.cpp index a0f73f5..9205ab9 100644 --- a/networkdeleter.cpp +++ b/networkdeleter.cpp @@ -1,6 +1,15 @@ #include "networkdeleter.h" #include "ui_networkdeleter.h" +#include +#include +#include +#include +#include +#include +#include +#include + NetworkDeleter::NetworkDeleter(QString networkName, QString networkUuidStr, QWidget *parent) : QDialog(parent), ui(new Ui::NetworkDeleter) diff --git a/networkdeleter.h b/networkdeleter.h index b45eee6..3f35508 100644 --- a/networkdeleter.h +++ b/networkdeleter.h @@ -2,14 +2,8 @@ #define NETWORKDELETER_H #include -#include -#include -#include -#include -#include -#include -#include -#include + +class QDBusPendingCallWatcher; namespace Ui { class NetworkDeleter; diff --git a/networkselector.cpp b/networkselector.cpp index 7a2a35b..c8c69d6 100644 --- a/networkselector.cpp +++ b/networkselector.cpp @@ -1,6 +1,20 @@ +#include "ethernetsettings.h" +#include "networkcreator.h" +#include "networkdeleter.h" #include "networkselector.h" -#include "./ui_networkselector.h" +#include "ui_networkselector.h" +#include "wifisettings.h" + +#include +#include #include +#include +#include +#include +#include +#include +#include +#include NetworkSelector::NetworkSelector(QWidget *parent) : QMainWindow(parent) diff --git a/networkselector.h b/networkselector.h index aaf6b46..7d443cb 100644 --- a/networkselector.h +++ b/networkselector.h @@ -1,24 +1,12 @@ #ifndef NETWORKSELECTOR_H #define NETWORKSELECTOR_H -#include "ethernetsettings.h" -#include "wifisettings.h" -#include "networkcreator.h" -#include "networkdeleter.h" - #include -#include -#include - -#include +#include #include -#include -#include #include -#include -#include -#include -#include + +class QStandardItemModel; QT_BEGIN_NAMESPACE namespace Ui { class NetworkSelector; } diff --git a/security802_1xtab.cpp b/security802_1xtab.cpp index 22ceab8..93ad792 100644 --- a/security802_1xtab.cpp +++ b/security802_1xtab.cpp @@ -1,6 +1,9 @@ +#include "connectionsettingsengine.h" #include "security802_1xtab.h" #include "ui_security802_1xtab.h" + #include +#include Security802_1xTab::Security802_1xTab(QWidget *parent) : QDialog(parent), diff --git a/security802_1xtab.h b/security802_1xtab.h index cfef5cd..2923b00 100644 --- a/security802_1xtab.h +++ b/security802_1xtab.h @@ -1,9 +1,7 @@ #ifndef SECURITY802_1XTAB_H #define SECURITY802_1XTAB_H -#include "connectionsettingsengine.h" #include -#include namespace Ui { class Security802_1xTab; diff --git a/wifisettings.cpp b/wifisettings.cpp index f7d592e..bf5b5ea 100644 --- a/wifisettings.cpp +++ b/wifisettings.cpp @@ -1,5 +1,10 @@ -#include "wifisettings.h" +#include "connectionsettingsengine.h" +#include "generalsettingstab.h" +#include "ipv4settingstab.h" +#include "ipv6settingstab.h" #include "ui_genericsettings.h" +#include "wifisettings.h" +#include "wifisettingstab.h" WifiSettings::WifiSettings(QString connUuidStr, QWidget *parent) : QDialog(parent), diff --git a/wifisettings.h b/wifisettings.h index 0cc8606..24b9375 100644 --- a/wifisettings.h +++ b/wifisettings.h @@ -1,12 +1,10 @@ #ifndef WIFISETTINGS_H #define WIFISETTINGS_H -#include "connectionsettingsengine.h" -#include "generalsettingstab.h" -#include "wifisettingstab.h" -#include "security802_1xtab.h" -#include "ipv4settingstab.h" -#include "ipv6settingstab.h" +class GeneralSettingsTab; +class WifiSettingsTab; +class Ipv4SettingsTab; +class Ipv6SettingsTab; #include diff --git a/wifisettingstab.cpp b/wifisettingstab.cpp index b21ef66..6f07b8e 100644 --- a/wifisettingstab.cpp +++ b/wifisettingstab.cpp @@ -1,5 +1,8 @@ -#include "wifisettingstab.h" +#include "connectionsettingsengine.h" #include "ui_wifisettingstab.h" +#include "wifisettingstab.h" + +#include WifiSettingsTab::WifiSettingsTab(QWidget *parent) : QWidget(parent), diff --git a/wifisettingstab.h b/wifisettingstab.h index b059375..085a318 100644 --- a/wifisettingstab.h +++ b/wifisettingstab.h @@ -1,9 +1,7 @@ #ifndef WIFISETTINGSTAB_H #define WIFISETTINGSTAB_H -#include "connectionsettingsengine.h" #include -#include namespace Ui { class WifiSettingsTab;