From ed5df41d7edf4408b1964d105f142c2a55afa974 Mon Sep 17 00:00:00 2001 From: firewave Date: Sun, 29 Sep 2024 03:46:49 +0200 Subject: [PATCH] cleaned up includes based on include-what-you-use --- cli/cmdlineparser.cpp | 1 - gui/codeeditstylecontrols.h | 1 - gui/codeeditstyledialog.cpp | 1 + gui/codeeditstyledialog.h | 2 +- gui/helpdialog.cpp | 1 + gui/resultsview.h | 2 ++ gui/scratchpad.cpp | 1 + gui/test/projectfile/testprojectfile.cpp | 1 - gui/test/projectfile/testprojectfile.h | 1 - gui/test/translationhandler/testtranslationhandler.h | 1 - gui/test/xmlreportv2/testxmlreportv2.h | 1 - lib/addoninfo.cpp | 1 + lib/astutils.h | 1 + lib/checkersreport.cpp | 1 + lib/checkother.cpp | 1 + lib/settings.cpp | 1 + lib/timer.h | 1 + lib/vfvalue.h | 1 - test/fixture.h | 1 + test/testpreprocessor.cpp | 2 ++ test/testprogrammemory.cpp | 1 + test/testsettings.cpp | 2 -- test/testtype.cpp | 3 --- test/testvalueflow.cpp | 1 + tools/dmake/dmake.cpp | 1 + 25 files changed, 18 insertions(+), 13 deletions(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 3f9850e703a..644586bbc2d 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -42,7 +42,6 @@ #include #include #include -#include #include #include // EXIT_FAILURE #include diff --git a/gui/codeeditstylecontrols.h b/gui/codeeditstylecontrols.h index 4ad82cd3f93..dbc7aedeed1 100644 --- a/gui/codeeditstylecontrols.h +++ b/gui/codeeditstylecontrols.h @@ -27,7 +27,6 @@ #include #include #include -#include class QWidget; diff --git a/gui/codeeditstyledialog.cpp b/gui/codeeditstyledialog.cpp index cf2988da43a..b7b782ffc39 100644 --- a/gui/codeeditstyledialog.cpp +++ b/gui/codeeditstyledialog.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/gui/codeeditstyledialog.h b/gui/codeeditstyledialog.h index f15509fdc68..bd7a70ac2a5 100644 --- a/gui/codeeditstyledialog.h +++ b/gui/codeeditstyledialog.h @@ -25,13 +25,13 @@ #include #include #include -#include class CodeEditor; class SelectColorButton; class SelectFontWeightCombo; class QPushButton; class QWidget; +class QString; #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) class QStringList; diff --git a/gui/helpdialog.cpp b/gui/helpdialog.cpp index bb9e5d5f692..1f2fa39771e 100644 --- a/gui/helpdialog.cpp +++ b/gui/helpdialog.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/gui/resultsview.h b/gui/resultsview.h index dc640a35e7c..8dc37b24591 100644 --- a/gui/resultsview.h +++ b/gui/resultsview.h @@ -23,6 +23,8 @@ #include "report.h" #include "showtypes.h" +#include + #include #include #include diff --git a/gui/scratchpad.cpp b/gui/scratchpad.cpp index 6258df73042..4ef6bad8f7f 100644 --- a/gui/scratchpad.cpp +++ b/gui/scratchpad.cpp @@ -25,6 +25,7 @@ #include #include +#include ScratchPad::ScratchPad(MainWindow& mainWindow) : QDialog(&mainWindow) diff --git a/gui/test/projectfile/testprojectfile.cpp b/gui/test/projectfile/testprojectfile.cpp index eb8e49b79b5..2fadc864dcb 100644 --- a/gui/test/projectfile/testprojectfile.cpp +++ b/gui/test/projectfile/testprojectfile.cpp @@ -26,7 +26,6 @@ #include -#include #include #include #include diff --git a/gui/test/projectfile/testprojectfile.h b/gui/test/projectfile/testprojectfile.h index fc61a6472e0..8f3e54c3008 100644 --- a/gui/test/projectfile/testprojectfile.h +++ b/gui/test/projectfile/testprojectfile.h @@ -17,7 +17,6 @@ */ #include -#include class TestProjectFile : public QObject { Q_OBJECT diff --git a/gui/test/translationhandler/testtranslationhandler.h b/gui/test/translationhandler/testtranslationhandler.h index 4c91a9670f9..249bbaa5ddd 100644 --- a/gui/test/translationhandler/testtranslationhandler.h +++ b/gui/test/translationhandler/testtranslationhandler.h @@ -17,7 +17,6 @@ */ #include -#include class TestTranslationHandler : public QObject { Q_OBJECT diff --git a/gui/test/xmlreportv2/testxmlreportv2.h b/gui/test/xmlreportv2/testxmlreportv2.h index 2b07aab4724..f4de863bff0 100644 --- a/gui/test/xmlreportv2/testxmlreportv2.h +++ b/gui/test/xmlreportv2/testxmlreportv2.h @@ -17,7 +17,6 @@ */ #include -#include class TestXmlReportV2 : public QObject { Q_OBJECT diff --git a/lib/addoninfo.cpp b/lib/addoninfo.cpp index 6f8ea7fa743..91a7aac10a9 100644 --- a/lib/addoninfo.cpp +++ b/lib/addoninfo.cpp @@ -22,6 +22,7 @@ #include "utils.h" #include +#include #include #include diff --git a/lib/astutils.h b/lib/astutils.h index e4d0ebfef0f..aac3708e88f 100644 --- a/lib/astutils.h +++ b/lib/astutils.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "config.h" diff --git a/lib/checkersreport.cpp b/lib/checkersreport.cpp index eb264ea61ac..4982634f89a 100644 --- a/lib/checkersreport.cpp +++ b/lib/checkersreport.cpp @@ -23,6 +23,7 @@ #include "settings.h" #include +#include #include #include #include diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 75ee59d5b46..8f0f4724c0f 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -37,6 +37,7 @@ #include // find_if() #include +#include #include #include #include diff --git a/lib/settings.cpp b/lib/settings.cpp index b0f609cb31b..86b315f8d83 100644 --- a/lib/settings.cpp +++ b/lib/settings.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/lib/timer.h b/lib/timer.h index ff15be48569..077a4ab6130 100644 --- a/lib/timer.h +++ b/lib/timer.h @@ -28,6 +28,7 @@ #include #include #include +#include enum class SHOWTIME_MODES : std::uint8_t { SHOWTIME_NONE, diff --git a/lib/vfvalue.h b/lib/vfvalue.h index 7671c3e3aed..3eb1dd3b467 100644 --- a/lib/vfvalue.h +++ b/lib/vfvalue.h @@ -31,7 +31,6 @@ #include #include #include -#include #include class Token; diff --git a/test/fixture.h b/test/fixture.h index 8d741223c6a..38c38a5d890 100644 --- a/test/fixture.h +++ b/test/fixture.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index 91e1e2051bf..e73d6373f6c 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -26,6 +26,8 @@ #include "preprocessor.h" #include "settings.h" #include "suppressions.h" +#include "tokenize.h" +#include "tokenlist.h" #include "fixture.h" #include "helpers.h" diff --git a/test/testprogrammemory.cpp b/test/testprogrammemory.cpp index 6bc99e9e6ad..63682e0f10a 100644 --- a/test/testprogrammemory.cpp +++ b/test/testprogrammemory.cpp @@ -16,6 +16,7 @@ * along with this program. If not, see . */ +#include "config.h" #include "fixture.h" #include "helpers.h" #include "token.h" diff --git a/test/testsettings.cpp b/test/testsettings.cpp index df79dd3d70f..69c4fa905d8 100644 --- a/test/testsettings.cpp +++ b/test/testsettings.cpp @@ -23,8 +23,6 @@ #include "helpers.h" #include "suppressions.h" - - class TestSettings : public TestFixture { public: TestSettings() : TestFixture("TestSettings") {} diff --git a/test/testtype.cpp b/test/testtype.cpp index f9e5a5359e4..8d3f4acb421 100644 --- a/test/testtype.cpp +++ b/test/testtype.cpp @@ -26,12 +26,9 @@ #include "tokenize.h" #include -#include #include #include -#include - class TestType : public TestFixture { public: TestType() : TestFixture("TestType") {} diff --git a/test/testvalueflow.cpp b/test/testvalueflow.cpp index 8230d637069..629ebd6dcd6 100644 --- a/test/testvalueflow.cpp +++ b/test/testvalueflow.cpp @@ -16,6 +16,7 @@ * along with this program. If not, see . */ +#include "errortypes.h" #include "fixture.h" #include "helpers.h" #include "mathlib.h" diff --git a/tools/dmake/dmake.cpp b/tools/dmake/dmake.cpp index f57a4f790df..3b50040779b 100644 --- a/tools/dmake/dmake.cpp +++ b/tools/dmake/dmake.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include