cleaned up GUI includes based on include-what-you-use (#3792)

This commit is contained in:
Oliver Stöneberg 2022-02-02 22:31:51 +01:00 committed by GitHub
parent a20465eaea
commit 58f9672ff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 30 additions and 24 deletions

View File

@ -21,8 +21,6 @@
#include "application.h"
#include "common.h"
#include <cstdlib>
#include <QFileInfo>
#include <QSettings>
#include <QStringList>

View File

@ -32,7 +32,6 @@
#include <QApplication>
#include <QCoreApplication>
#include <QMetaType>
#include <QStringList>
#include <QSettings>

View File

@ -20,9 +20,7 @@
#include "common.h"
#include <QMap>
#include <QSettings>
#include <QString>
ShowTypes::ShowTypes()
{

View File

@ -31,6 +31,17 @@
#include <QTextDocument>
#include <QWidget>
#ifdef HAVE_QCHART
#include <QAbstractSeries>
#include <QChartView>
#include <QDateTimeAxis>
#include <QLineSeries>
#include <QTextStream>
#include <QValueAxis>
using namespace QtCharts;
#endif
static const QString CPPCHECK("cppcheck");
StatsDialog::StatsDialog(QWidget *parent)

View File

@ -22,13 +22,17 @@
#include "ui_stats.h"
#include <QDialog>
#ifdef HAVE_QCHART
#include <QtCharts>
#endif
class ProjectFile;
class CheckStatistics;
#ifdef HAVE_QCHART
namespace QtCharts {
class QChartView;
class QLineSeries;
}
#endif
/// @addtogroup GUI
/// @{
@ -70,8 +74,8 @@ private slots:
void copyToClipboard();
void pdfExport();
#ifdef HAVE_QCHART
QChartView *createChart(const QString &statsFile, const QString &tool);
QLineSeries *numberOfReports(const QString &fileName, const QString &severity) const;
QtCharts::QChartView *createChart(const QString &statsFile, const QString &tool);
QtCharts::QLineSeries *numberOfReports(const QString &fileName, const QString &severity) const;
#endif
private:
Ui::StatsDialog mUI;

View File

@ -19,15 +19,14 @@
#include "benchmarksimple.h"
#include "settings.h"
#include "token.h"
#include "tokenize.h"
#include <sstream>
#include <QByteArray>
#include <QFile>
#include <QObject>
#include <QString>
#include <QtTest>
void BenchmarkSimple::tokenize()
{

View File

@ -19,7 +19,6 @@
#include "errorlogger.h"
#include <QObject>
#include <QtTest/QtTest>
class BenchmarkSimple : public QObject, public ErrorLogger {
Q_OBJECT

View File

@ -18,6 +18,9 @@
#include "testcppchecklibrarydata.h"
#include <QDebug>
#include <QTest>
const QString TestCppcheckLibraryData::TempCfgFile = "./tmp.cfg";
void TestCppcheckLibraryData::init()

View File

@ -18,7 +18,7 @@
#include "cppchecklibrarydata.h"
#include <QtTest/QtTest>
#include <QObject>
class TestCppcheckLibraryData : public QObject {
Q_OBJECT

View File

@ -21,8 +21,8 @@
#include "filelist.h"
#include <QDir>
#include <QObject>
#include <QString>
#include <QTest>
void TestFileList::addFile()
{

View File

@ -17,7 +17,6 @@
*/
#include <QObject>
#include <QtTest/QtTest>
class TestFileList : public QObject {
Q_OBJECT

View File

@ -21,7 +21,7 @@
#include "projectfile.h"
#include "settings.h"
#include <QObject>
#include <QtTest>
// Mock...
const char Settings::SafeChecks::XmlRootName[] = "safe-checks";

View File

@ -17,7 +17,6 @@
*/
#include <QObject>
#include <QtTest/QtTest>
class TestProjectFile : public QObject {
Q_OBJECT

View File

@ -20,7 +20,7 @@
#include "translationhandler.h"
#include <QObject>
#include <QtTest>
static const QStringList getTranslationNames(const TranslationHandler& handler)
{

View File

@ -17,7 +17,6 @@
*/
#include <QObject>
#include <QtTest/QtTest>
class TestTranslationHandler : public QObject {
Q_OBJECT

View File

@ -21,7 +21,7 @@
#include "erroritem.h"
#include "xmlreportv2.h"
#include <QObject>
#include <QtTest>
void TestXmlReportV2::readXml()
{

View File

@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QtTest/QtTest>
#include <QObject>
class TestXmlReportV2 : public QObject {

View File

@ -21,7 +21,6 @@
#include <QList>
#include <QObject>
#include <QStringList>
class QTranslator;

View File

@ -19,7 +19,7 @@
// Generate Makefile for cppcheck
#include <algorithm>
#include <fstream>
#include <fstream> // IWYU pragma: keep
#include <iostream>
#include <string>
#include <vector>