From 45aeff3e28032286f44154cf7ac410de4fac93ad Mon Sep 17 00:00:00 2001 From: firewave Date: Sat, 10 Aug 2024 20:39:31 +0200 Subject: [PATCH] cleaned up GUI includes based on include-what-you-use --- gui/checkstatistics.cpp | 1 + gui/cppchecklibrarydata.cpp | 1 - gui/csvreport.cpp | 1 - gui/test/cppchecklibrarydata/testcppchecklibrarydata.cpp | 1 + gui/threadhandler.cpp | 1 + gui/translationhandler.cpp | 4 ++++ gui/xmlreportv2.cpp | 1 + tools/triage/mainwindow.cpp | 1 + 8 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gui/checkstatistics.cpp b/gui/checkstatistics.cpp index 93ceb362f993..8f5c5bd60b19 100644 --- a/gui/checkstatistics.cpp +++ b/gui/checkstatistics.cpp @@ -21,6 +21,7 @@ #include #include #include +#include CheckStatistics::CheckStatistics(QObject *parent) : QObject(parent) diff --git a/gui/cppchecklibrarydata.cpp b/gui/cppchecklibrarydata.cpp index 4628e07f85ee..595f32a034d9 100644 --- a/gui/cppchecklibrarydata.cpp +++ b/gui/cppchecklibrarydata.cpp @@ -28,7 +28,6 @@ #include #include #include -#include const unsigned int CppcheckLibraryData::Function::Arg::ANY = ~0U; const unsigned int CppcheckLibraryData::Function::Arg::VARIADIC = ~1U; diff --git a/gui/csvreport.cpp b/gui/csvreport.cpp index f99dd5061e38..bdbed6319edf 100644 --- a/gui/csvreport.cpp +++ b/gui/csvreport.cpp @@ -24,7 +24,6 @@ #include #include #include -#include CsvReport::CsvReport(const QString &filename) : Report(filename) diff --git a/gui/test/cppchecklibrarydata/testcppchecklibrarydata.cpp b/gui/test/cppchecklibrarydata/testcppchecklibrarydata.cpp index 015e8a60dec0..744902cb5d35 100644 --- a/gui/test/cppchecklibrarydata/testcppchecklibrarydata.cpp +++ b/gui/test/cppchecklibrarydata/testcppchecklibrarydata.cpp @@ -27,6 +27,7 @@ #include #include #include +#include const QString TestCppcheckLibraryData::TempCfgFile = "./tmp.cfg"; diff --git a/gui/threadhandler.cpp b/gui/threadhandler.cpp index 1ed363eda962..ef35a5d8d6c6 100644 --- a/gui/threadhandler.cpp +++ b/gui/threadhandler.cpp @@ -35,6 +35,7 @@ #include #include #include +#include ThreadHandler::ThreadHandler(QObject *parent) : QObject(parent) diff --git a/gui/translationhandler.cpp b/gui/translationhandler.cpp index c41ccbfea964..ee523d32b252 100644 --- a/gui/translationhandler.cpp +++ b/gui/translationhandler.cpp @@ -28,7 +28,11 @@ #include #include #include +#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)) +#include +#else #include +#endif // Provide own translations for standard buttons. This (garbage) code is needed to enforce them to appear in .ts files even after "lupdate gui.pro" diff --git a/gui/xmlreportv2.cpp b/gui/xmlreportv2.cpp index b489af33ad7f..41de23473e2c 100644 --- a/gui/xmlreportv2.cpp +++ b/gui/xmlreportv2.cpp @@ -32,6 +32,7 @@ #include #include #include +#include static const QString ResultElementName = "results"; static const QString CppcheckElementName = "cppcheck"; diff --git a/tools/triage/mainwindow.cpp b/tools/triage/mainwindow.cpp index 78706dd4737b..7f0f4c7e0dbe 100644 --- a/tools/triage/mainwindow.cpp +++ b/tools/triage/mainwindow.cpp @@ -58,6 +58,7 @@ #include #include #include +#include class QWidget;