cleaned up GUI includes based on include-what-you-use (#3792)
This commit is contained in:
parent
a20465eaea
commit
58f9672ff4
|
@ -21,8 +21,6 @@
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#include <cstdlib>
|
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QMetaType>
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,7 @@
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#include <QMap>
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
ShowTypes::ShowTypes()
|
ShowTypes::ShowTypes()
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,6 +31,17 @@
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
#include <QWidget>
|
#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");
|
static const QString CPPCHECK("cppcheck");
|
||||||
|
|
||||||
StatsDialog::StatsDialog(QWidget *parent)
|
StatsDialog::StatsDialog(QWidget *parent)
|
||||||
|
|
|
@ -22,13 +22,17 @@
|
||||||
#include "ui_stats.h"
|
#include "ui_stats.h"
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#ifdef HAVE_QCHART
|
|
||||||
#include <QtCharts>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class ProjectFile;
|
class ProjectFile;
|
||||||
class CheckStatistics;
|
class CheckStatistics;
|
||||||
|
|
||||||
|
#ifdef HAVE_QCHART
|
||||||
|
namespace QtCharts {
|
||||||
|
class QChartView;
|
||||||
|
class QLineSeries;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/// @addtogroup GUI
|
/// @addtogroup GUI
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
|
@ -70,8 +74,8 @@ private slots:
|
||||||
void copyToClipboard();
|
void copyToClipboard();
|
||||||
void pdfExport();
|
void pdfExport();
|
||||||
#ifdef HAVE_QCHART
|
#ifdef HAVE_QCHART
|
||||||
QChartView *createChart(const QString &statsFile, const QString &tool);
|
QtCharts::QChartView *createChart(const QString &statsFile, const QString &tool);
|
||||||
QLineSeries *numberOfReports(const QString &fileName, const QString &severity) const;
|
QtCharts::QLineSeries *numberOfReports(const QString &fileName, const QString &severity) const;
|
||||||
#endif
|
#endif
|
||||||
private:
|
private:
|
||||||
Ui::StatsDialog mUI;
|
Ui::StatsDialog mUI;
|
||||||
|
|
|
@ -19,15 +19,14 @@
|
||||||
#include "benchmarksimple.h"
|
#include "benchmarksimple.h"
|
||||||
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "token.h"
|
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QObject>
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QtTest>
|
||||||
|
|
||||||
void BenchmarkSimple::tokenize()
|
void BenchmarkSimple::tokenize()
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#include "errorlogger.h"
|
#include "errorlogger.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtTest/QtTest>
|
|
||||||
|
|
||||||
class BenchmarkSimple : public QObject, public ErrorLogger {
|
class BenchmarkSimple : public QObject, public ErrorLogger {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
|
|
||||||
#include "testcppchecklibrarydata.h"
|
#include "testcppchecklibrarydata.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
const QString TestCppcheckLibraryData::TempCfgFile = "./tmp.cfg";
|
const QString TestCppcheckLibraryData::TempCfgFile = "./tmp.cfg";
|
||||||
|
|
||||||
void TestCppcheckLibraryData::init()
|
void TestCppcheckLibraryData::init()
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#include "cppchecklibrarydata.h"
|
#include "cppchecklibrarydata.h"
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QObject>
|
||||||
|
|
||||||
class TestCppcheckLibraryData : public QObject {
|
class TestCppcheckLibraryData : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
#include "filelist.h"
|
#include "filelist.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QObject>
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
void TestFileList::addFile()
|
void TestFileList::addFile()
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtTest/QtTest>
|
|
||||||
|
|
||||||
class TestFileList : public QObject {
|
class TestFileList : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "projectfile.h"
|
#include "projectfile.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QtTest>
|
||||||
|
|
||||||
// Mock...
|
// Mock...
|
||||||
const char Settings::SafeChecks::XmlRootName[] = "safe-checks";
|
const char Settings::SafeChecks::XmlRootName[] = "safe-checks";
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtTest/QtTest>
|
|
||||||
|
|
||||||
class TestProjectFile : public QObject {
|
class TestProjectFile : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "translationhandler.h"
|
#include "translationhandler.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QtTest>
|
||||||
|
|
||||||
static const QStringList getTranslationNames(const TranslationHandler& handler)
|
static const QStringList getTranslationNames(const TranslationHandler& handler)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtTest/QtTest>
|
|
||||||
|
|
||||||
class TestTranslationHandler : public QObject {
|
class TestTranslationHandler : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "erroritem.h"
|
#include "erroritem.h"
|
||||||
#include "xmlreportv2.h"
|
#include "xmlreportv2.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QtTest>
|
||||||
|
|
||||||
void TestXmlReportV2::readXml()
|
void TestXmlReportV2::readXml()
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
class TestXmlReportV2 : public QObject {
|
class TestXmlReportV2 : public QObject {
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
|
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
|
||||||
|
|
||||||
class QTranslator;
|
class QTranslator;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// Generate Makefile for cppcheck
|
// Generate Makefile for cppcheck
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <fstream>
|
#include <fstream> // IWYU pragma: keep
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
Loading…
Reference in New Issue