Skip to content

Commit

Permalink
cleaned up GUI includes based on include-what-you-use
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Aug 10, 2024
1 parent becd27a commit a602cd7
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions gui/checkstatistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <QDebug>
#include <QList>
#include <QSet>
#include <QtLogging>

CheckStatistics::CheckStatistics(QObject *parent)
: QObject(parent)
Expand Down
5 changes: 2 additions & 3 deletions gui/cppchecklibrarydata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <QXmlStreamAttributes>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>

const unsigned int CppcheckLibraryData::Function::Arg::ANY = ~0U;
const unsigned int CppcheckLibraryData::Function::Arg::VARIADIC = ~1U;
Expand Down Expand Up @@ -693,14 +692,14 @@ static void writeFunction(QXmlStreamWriter &xmlWriter, const CppcheckLibraryData
}
if (!function.notOverlappingDataArgs.isEmpty()) {
xmlWriter.writeStartElement("not-overlapping-data");
foreach (const QString& value, function.notOverlappingDataArgs) {
for (const QString& value : function.notOverlappingDataArgs) {
xmlWriter.writeAttribute(function.notOverlappingDataArgs.key(value), value);
}
xmlWriter.writeEndElement();
}
if (!function.containerAttributes.isEmpty()) {
xmlWriter.writeStartElement("container");
foreach (const QString& value, function.containerAttributes) {
for (const QString& value : function.containerAttributes) {
xmlWriter.writeAttribute(function.containerAttributes.key(value), value);
}
xmlWriter.writeEndElement();
Expand Down
1 change: 0 additions & 1 deletion gui/csvreport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <QDir>
#include <QFile>
#include <QList>
#include <QtGlobal>

CsvReport::CsvReport(const QString &filename) :
Report(filename)
Expand Down
2 changes: 2 additions & 0 deletions gui/resultsview.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "report.h"
#include "showtypes.h"

#include <cstdint>

#include <QObject>
#include <QString>
#include <QStringList>
Expand Down
1 change: 1 addition & 0 deletions gui/test/cppchecklibrarydata/testcppchecklibrarydata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <QStringList>
#include <QTextStream>
#include <QtTest>
#include <QtLogging>

const QString TestCppcheckLibraryData::TempCfgFile = "./tmp.cfg";

Expand Down
1 change: 1 addition & 0 deletions gui/threadhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <QSettings>
#include <QTextStream>
#include <QVariant>
#include <QtLogging>

ThreadHandler::ThreadHandler(QObject *parent) :
QObject(parent)
Expand Down
2 changes: 1 addition & 1 deletion gui/translationhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <QLocale>
#include <QMessageBox>
#include <QTranslator>
#include <QtGlobal>
#include <QtPreprocessorSupport>


// Provide own translations for standard buttons. This (garbage) code is needed to enforce them to appear in .ts files even after "lupdate gui.pro"
Expand Down
1 change: 1 addition & 0 deletions gui/xmlreportv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <QXmlStreamAttributes>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtLogging>

static const QString ResultElementName = "results";
static const QString CppcheckElementName = "cppcheck";
Expand Down
1 change: 1 addition & 0 deletions tools/triage/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include <QTextStream>
#include <QTreeView>
#include <QtCore>
#include <QtLogging>

class QWidget;

Expand Down

0 comments on commit a602cd7

Please sign in to comment.