Skip to content

Commit e0e5013

Browse files
authored
cleaned up includes based on include-what-you-use (danmar#2632)
* cleaned up includes based on include-what-you-use * token.cpp: fixed -Wextra-semi-stmt warning
1 parent e066300 commit e0e5013

File tree

11 files changed

+7
-11
lines changed

11 files changed

+7
-11
lines changed

gui/codeeditor.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
class CodeEditorStyle;
1010
class QPaintEvent;
1111
class QResizeEvent;
12-
class QSize;
13-
class QWidget;
1412

1513
class Highlighter : public QSyntaxHighlighter {
1614
Q_OBJECT

gui/filelist.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <QDir>
2121
#include <QFileInfo>
2222
#include "filelist.h"
23-
#include "path.h"
2423
#include "pathmatch.h"
2524

2625
QStringList FileList::getDefaultFilters()

gui/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
#include <QSettings>
2525
#ifdef _WIN32
2626
#include <QMessageBox>
27+
#include "aboutdialog.h"
2728
#else
2829
#include <iostream>
2930
#endif
3031
#include "cppcheck.h"
3132
#include "common.h"
3233
#include "mainwindow.h"
3334
#include "erroritem.h"
34-
#include "aboutdialog.h"
3535
#include "translationhandler.h"
3636

3737

gui/mainwindow.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class ThreadHandler;
3434
class TranslationHandler;
3535
class ScratchPad;
3636
class ProjectFile;
37-
class ErrorItem;
3837
class QAction;
3938

4039
/// @addtogroup GUI

gui/threadhandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
#include <QDateTime>
2626
#include <set>
2727
#include "threadresult.h"
28-
#include "importproject.h"
2928
#include "suppressions.h"
3029

3130
class ResultsView;
3231
class CheckThread;
3332
class QSettings;
3433
class Settings;
34+
class ImportProject;
3535

3636
/// @addtogroup GUI
3737
/// @{

gui/xmlreport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "report.h"
2525

2626
class ErrorItem;
27-
class QObject;
2827

2928
/// @addtogroup GUI
3029
/// @{

lib/check.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
//---------------------------------------------------------------------------
2323

2424
#include "config.h"
25-
#include "token.h"
25+
#include "errorlogger.h" // for Severity::SeverityType
2626
#include "tokenize.h"
2727

2828
#include <list>
@@ -42,6 +42,7 @@ namespace ValueFlow {
4242

4343
class Settings;
4444
class Token;
45+
class ErrorLogger;
4546

4647
/** Use WRONG_DATA in checkers to mark conditions that check that data is correct */
4748
#define WRONG_DATA(COND, TOK) (wrongData((TOK), (COND), #COND))

lib/exprengine.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@
131131

132132
#include "exprengine.h"
133133
#include "astutils.h"
134-
#include "path.h"
135134
#include "settings.h"
136135
#include "symboldatabase.h"
137136
#include "tokenize.h"

lib/forwardanalyzer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#ifndef forwardanalyzerH
2020
#define forwardanalyzerH
2121

22-
#include "valueptr.h"
2322
#include <vector>
2423

2524
class Settings;
2625
class Token;
26+
template <class T> class ValuePtr;
2727

2828
struct ForwardAnalyzer {
2929
struct Action {

lib/token.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,7 @@ void Token::printValueFlow(bool xml, std::ostream &out) const
15771577
case ValueFlow::Value::ValueKind::Possible:
15781578
out << "possible ";
15791579
break;
1580-
};
1580+
}
15811581
}
15821582
if (tok->mImpl->mValues->size() > 1U)
15831583
out << '{';

0 commit comments

Comments
 (0)