Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions gui/applicationlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#include "application.h"
#include "common.h"

#include <cstdlib>

#include <QFileInfo>
#include <QSettings>
#include <QStringList>
Expand Down
1 change: 0 additions & 1 deletion gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include <QApplication>
#include <QCoreApplication>
#include <QMetaType>
#include <QStringList>
#include <QSettings>

Expand Down
2 changes: 0 additions & 2 deletions gui/showtypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@

#include "common.h"

#include <QMap>
#include <QSettings>
#include <QString>

ShowTypes::ShowTypes()
{
Expand Down
11 changes: 11 additions & 0 deletions gui/statsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 9 additions & 5 deletions gui/statsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// @{

Expand Down Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions gui/test/benchmark/simple/benchmarksimple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
1 change: 0 additions & 1 deletion gui/test/benchmark/simple/benchmarksimple.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "errorlogger.h"

#include <QObject>
#include <QtTest/QtTest>

class BenchmarkSimple : public QObject, public ErrorLogger {
Q_OBJECT
Expand Down
3 changes: 3 additions & 0 deletions gui/test/cppchecklibrarydata/testcppchecklibrarydata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

#include "testcppchecklibrarydata.h"

#include <QDebug>
#include <QTest>

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

void TestCppcheckLibraryData::init()
Expand Down
2 changes: 1 addition & 1 deletion gui/test/cppchecklibrarydata/testcppchecklibrarydata.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "cppchecklibrarydata.h"

#include <QtTest/QtTest>
#include <QObject>

class TestCppcheckLibraryData : public QObject {
Q_OBJECT
Expand Down
2 changes: 1 addition & 1 deletion gui/test/filelist/testfilelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include "filelist.h"

#include <QDir>
#include <QObject>
#include <QString>
#include <QTest>

void TestFileList::addFile()
{
Expand Down
1 change: 0 additions & 1 deletion gui/test/filelist/testfilelist.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

#include <QObject>
#include <QtTest/QtTest>

class TestFileList : public QObject {
Q_OBJECT
Expand Down
2 changes: 1 addition & 1 deletion gui/test/projectfile/testprojectfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "projectfile.h"
#include "settings.h"

#include <QObject>
#include <QtTest>

// Mock...
const char Settings::SafeChecks::XmlRootName[] = "safe-checks";
Expand Down
1 change: 0 additions & 1 deletion gui/test/projectfile/testprojectfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

#include <QObject>
#include <QtTest/QtTest>

class TestProjectFile : public QObject {
Q_OBJECT
Expand Down
2 changes: 1 addition & 1 deletion gui/test/translationhandler/testtranslationhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "translationhandler.h"

#include <QObject>
#include <QtTest>

static const QStringList getTranslationNames(const TranslationHandler& handler)
{
Expand Down
1 change: 0 additions & 1 deletion gui/test/translationhandler/testtranslationhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

#include <QObject>
#include <QtTest/QtTest>

class TestTranslationHandler : public QObject {
Q_OBJECT
Expand Down
2 changes: 1 addition & 1 deletion gui/test/xmlreportv2/testxmlreportv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "erroritem.h"
#include "xmlreportv2.h"

#include <QObject>
#include <QtTest>

void TestXmlReportV2::readXml()
{
Expand Down
1 change: 0 additions & 1 deletion gui/test/xmlreportv2/testxmlreportv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion gui/translationhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include <QList>
#include <QObject>
#include <QStringList>

class QTranslator;

Expand Down
2 changes: 1 addition & 1 deletion tools/dmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// Generate Makefile for cppcheck

#include <algorithm>
#include <fstream>
#include <fstream> // IWYU pragma: keep
#include <iostream>
#include <string>
#include <vector>
Expand Down