Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Cleanup of includes in GUI (Removed redundant includes, use forward d…

…eclarations) - Build speedup by 3% in VS10 (LINKCORE=yes, Qt 4.8.3)
  • Loading branch information...
commit b1a768e5ecf97c985576224ac8a2552e4db28fb5 1 parent 5d796a5
PKEuS authored October 07, 2012
1  gui/applicationdialog.cpp
@@ -20,7 +20,6 @@
20 20
 #include <QWidget>
21 21
 #include <QDialog>
22 22
 #include <QFileDialog>
23  
-#include <QDebug>
24 23
 #include <QMessageBox>
25 24
 #include "applicationdialog.h"
26 25
 #include "application.h"
1  gui/applicationdialog.h
@@ -20,7 +20,6 @@
20 20
 #define APPLICATIONDIALOG_H
21 21
 
22 22
 #include <QDialog>
23  
-#include <QLineEdit>
24 23
 #include <QString>
25 24
 #include "application.h"
26 25
 #include "ui_application.h"
1  gui/applicationlist.cpp
@@ -16,7 +16,6 @@
16 16
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 17
  */
18 18
 
19  
-#include <QStringList>
20 19
 #include <QFileInfo>
21 20
 #include <QObject>
22 21
 #include <QSettings>
1  gui/applicationlist.h
@@ -20,7 +20,6 @@
20 20
 #define APPLICATIONLIST_H
21 21
 
22 22
 #include <QObject>
23  
-#include <QSettings>
24 23
 #include "application.h"
25 24
 
26 25
 /// @addtogroup GUI
1  gui/checkstatistics.cpp
@@ -17,7 +17,6 @@
17 17
  */
18 18
 
19 19
 #include <QDebug>
20  
-#include "common.h"
21 20
 #include "checkstatistics.h"
22 21
 
23 22
 CheckStatistics::CheckStatistics(QObject *parent)
1  gui/checkstatistics.h
@@ -20,7 +20,6 @@
20 20
 #define CHECKSTATISTICS_H
21 21
 
22 22
 #include <QObject>
23  
-#include "common.h"
24 23
 #include "showtypes.h"
25 24
 
26 25
 /// @addtogroup GUI
3  gui/checkthread.h
@@ -22,9 +22,10 @@
22 22
 
23 23
 #include <QThread>
24 24
 #include "cppcheck.h"
25  
-#include "settings.h"
26 25
 #include "threadresult.h"
27 26
 
  27
+class Settings;
  28
+
28 29
 /// @addtogroup GUI
29 30
 /// @{
30 31
 
1  gui/csvreport.cpp
@@ -19,7 +19,6 @@
19 19
 #include <QObject>
20 20
 #include <QString>
21 21
 #include <QDir>
22  
-#include <QFile>
23 22
 #include <QTextStream>
24 23
 #include "report.h"
25 24
 #include "csvreport.h"
2  gui/csvreport.h
@@ -21,8 +21,6 @@
21 21
 
22 22
 #include <QObject>
23 23
 #include <QString>
24  
-#include <QStringList>
25  
-#include <QFile>
26 24
 #include <QTextStream>
27 25
 #include "report.h"
28 26
 
1  gui/filelist.cpp
@@ -20,7 +20,6 @@
20 20
 #include <QStringList>
21 21
 #include <QDir>
22 22
 #include <QFileInfo>
23  
-#include <QDebug>
24 23
 #include "filelist.h"
25 24
 
26 25
 QStringList FileList::GetDefaultFilters()
1  gui/filelist.h
@@ -19,7 +19,6 @@
19 19
 #ifndef FILELIST_H
20 20
 #define FILELIST_H
21 21
 
22  
-#include <QList>
23 22
 #include <QFileInfoList>
24 23
 #include <QStringList>
25 24
 
1  gui/main.cpp
@@ -20,7 +20,6 @@
20 20
 #include <QApplication>
21 21
 #include <QCoreApplication>
22 22
 #include <QTextCodec>
23  
-#include <QTranslator>
24 23
 #include <QMetaType>
25 24
 #include <QStringList>
26 25
 #ifdef _WIN32
10  gui/mainwindow.cpp
@@ -18,12 +18,7 @@
18 18
 
19 19
 #include <QApplication>
20 20
 #include <QDebug>
21  
-#include <QMenu>
22  
-#include <QDirIterator>
23  
-#include <QMenuBar>
24 21
 #include <QMessageBox>
25  
-#include <QToolBar>
26  
-#include <QKeySequence>
27 22
 #include <QFileInfo>
28 23
 #include <QDir>
29 24
 #include <QDesktopServices>
@@ -31,13 +26,18 @@
31 26
 #include <QAction>
32 27
 #include <QActionGroup>
33 28
 #include "mainwindow.h"
  29
+#include "cppcheck.h"
  30
+#include "applicationlist.h"
34 31
 #include "aboutdialog.h"
  32
+#include "common.h"
35 33
 #include "threadhandler.h"
36 34
 #include "fileviewdialog.h"
37 35
 #include "projectfile.h"
38 36
 #include "project.h"
39 37
 #include "report.h"
40 38
 #include "statsdialog.h"
  39
+#include "settingsdialog.h"
  40
+#include "translationhandler.h"
41 41
 #include "logview.h"
42 42
 #include "filelist.h"
43 43
 #include "showtypes.h"
8  gui/mainwindow.h
@@ -22,26 +22,20 @@
22 22
 #include <QMainWindow>
23 23
 #include <QSettings>
24 24
 #include <QFileDialog>
25  
-#include <QSignalMapper>
26 25
 #include <QActionGroup>
27 26
 #include <QTimer>
28  
-#include <QToolBar>
29 27
 #include <QStringList>
30 28
 
31  
-#include "resultsview.h"
32  
-#include "settingsdialog.h"
33  
-#include "translationhandler.h"
34 29
 #include "settings.h"
35 30
 #include "platforms.h"
36 31
 #include "ui_main.h"
37 32
 
38 33
 class ThreadHandler;
  34
+class TranslationHandler;
39 35
 class LogView;
40 36
 class Project;
41 37
 class ErrorItem;
42  
-class StatsDialog;
43 38
 class QAction;
44  
-class QActionGroup;
45 39
 
46 40
 /// @addtogroup GUI
47 41
 /// @{
1  gui/projectfiledialog.cpp
@@ -22,7 +22,6 @@
22 22
 #include <QStringList>
23 23
 #include <QFileInfo>
24 24
 #include <QFileDialog>
25  
-#include <QLineEdit>
26 25
 #include <QDir>
27 26
 #include <QSettings>
28 27
 #include "common.h"
2  gui/projectfiledialog.h
@@ -25,9 +25,7 @@
25 25
 
26 26
 #include "ui_projectfile.h"
27 27
 
28  
-class ProjectFile;
29 28
 class QWidget;
30  
-class QLineEdit;
31 29
 
32 30
 /// @addtogroup GUI
33 31
 /// @{
1  gui/report.cpp
@@ -19,7 +19,6 @@
19 19
 #include <QObject>
20 20
 #include <QString>
21 21
 #include <QFile>
22  
-#include "erroritem.h"
23 22
 #include "report.h"
24 23
 
25 24
 Report::Report(const QString &filename, QObject * parent) :
1  gui/report.h
@@ -21,7 +21,6 @@
21 21
 
22 22
 #include <QObject>
23 23
 #include <QString>
24  
-#include <QStringList>
25 24
 #include <QFile>
26 25
 #include "erroritem.h"
27 26
 
5  gui/resultstree.cpp
@@ -19,7 +19,6 @@
19 19
 #include <QApplication>
20 20
 #include <QWidget>
21 21
 #include <QStandardItem>
22  
-#include <QModelIndex>
23 22
 #include <QDebug>
24 23
 #include <QString>
25 24
 #include <QStringList>
@@ -37,13 +36,11 @@
37 36
 #include <QClipboard>
38 37
 #include <QContextMenuEvent>
39 38
 #include <QModelIndex>
40  
-#include <QItemSelectionModel>
  39
+#include "common.h"
41 40
 #include "erroritem.h"
42  
-#include "settings.h"
43 41
 #include "applicationlist.h"
44 42
 #include "resultstree.h"
45 43
 #include "report.h"
46  
-#include "xmlreport.h"
47 44
 #include "application.h"
48 45
 #include "showtypes.h"
49 46
 
4  gui/resultstree.h
@@ -25,12 +25,10 @@
25 25
 #include <QStandardItem>
26 26
 #include <QSettings>
27 27
 #include <QContextMenuEvent>
28  
-#include <QTextStream>
29  
-#include "common.h"
30  
-#include "applicationlist.h"
31 28
 #include "errorlogger.h" // Severity
32 29
 #include "showtypes.h"
33 30
 
  31
+class ApplicationList;
34 32
 class Report;
35 33
 class ErrorItem;
36 34
 class ErrorLine;
3  gui/resultsview.cpp
@@ -16,8 +16,6 @@
16 16
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 17
  */
18 18
 
19  
-#include <QDebug>
20  
-#include <QFile>
21 19
 #include <QMessageBox>
22 20
 #include <QStandardItemModel>
23 21
 #include <QStandardItem>
@@ -28,7 +26,6 @@
28 26
 #include "common.h"
29 27
 #include "erroritem.h"
30 28
 #include "resultsview.h"
31  
-#include "resultstree.h"
32 29
 #include "report.h"
33 30
 #include "txtreport.h"
34 31
 #include "xmlreport.h"
2  gui/resultsview.h
@@ -22,8 +22,6 @@
22 22
 
23 23
 
24 24
 #include <QWidget>
25  
-#include "errorlogger.h"
26  
-#include "common.h"
27 25
 #include "report.h"
28 26
 #include "showtypes.h"
29 27
 #include "ui_resultsview.h"
2  gui/selectfilesdialog.cpp
@@ -20,8 +20,6 @@
20 20
 #include "ui_selectfilesdialog.h"
21 21
 #include "filelist.h"
22 22
 
23  
-#include <QTreeView>
24  
-#include <QVBoxLayout>
25 23
 #include <QFileSystemModel>
26 24
 #include <QStringList>
27 25
 #include <QPushButton>
3  gui/settingsdialog.cpp
@@ -19,11 +19,8 @@
19 19
 
20 20
 #include <QDialog>
21 21
 #include <QWidget>
22  
-#include <QLabel>
23 22
 #include <QList>
24  
-#include <QDebug>
25 23
 #include <QListWidgetItem>
26  
-#include <QTabWidget>
27 24
 #include <QSettings>
28 25
 #include <QFileDialog>
29 26
 #include <QThread>
1  gui/settingsdialog.h
@@ -21,7 +21,6 @@
21 21
 #define SETTINGSDIALOG_H
22 22
 
23 23
 #include <QDialog>
24  
-#include <QKeyEvent>
25 24
 #include "ui_settings.h"
26 25
 
27 26
 class QSettings;
1  gui/statsdialog.cpp
@@ -21,7 +21,6 @@
21 21
 #include <QString>
22 22
 #include <QClipboard>
23 23
 #include <QMimeData>
24  
-#include "common.h"
25 24
 #include "project.h"
26 25
 #include "projectfile.h"
27 26
 #include "statsdialog.h"
2  gui/threadhandler.cpp
@@ -20,7 +20,9 @@
20 20
 #include <QFileInfo>
21 21
 #include <QStringList>
22 22
 #include <QDebug>
  23
+#include "common.h"
23 24
 #include "settings.h"
  25
+#include "checkthread.h"
24 26
 #include "threadhandler.h"
25 27
 #include "resultsview.h"
26 28
 
9  gui/threadhandler.h
@@ -24,11 +24,12 @@
24 24
 #include <QStringList>
25 25
 #include <QDateTime>
26 26
 #include <set>
27  
-#include "settings.h"
28  
-#include "cppcheck.h"
29 27
 #include "threadresult.h"
30  
-#include "checkthread.h"
31  
-#include "resultsview.h"
  28
+
  29
+class ResultsView;
  30
+class CheckThread;
  31
+class QSettings;
  32
+class Settings;
32 33
 
33 34
 /// @addtogroup GUI
34 35
 /// @{
1  gui/threadresult.h
@@ -23,7 +23,6 @@
23 23
 #include <QMutex>
24 24
 #include <QObject>
25 25
 #include <QStringList>
26  
-#include <QVariant>
27 26
 #include "errorlogger.h"
28 27
 
29 28
 class ErrorItem;
2  gui/txtreport.cpp
@@ -17,8 +17,6 @@
17 17
  */
18 18
 
19 19
 #include <QDir>
20  
-#include <QFile>
21  
-#include <QTextStream>
22 20
 #include "txtreport.h"
23 21
 
24 22
 TxtReport::TxtReport(const QString &filename, QObject * parent) :
2  gui/txtreport.h
@@ -21,8 +21,6 @@
21 21
 
22 22
 #include <QObject>
23 23
 #include <QString>
24  
-#include <QStringList>
25  
-#include <QFile>
26 24
 #include <QTextStream>
27 25
 #include "report.h"
28 26
 
1  gui/xmlreportv1.cpp
@@ -20,7 +20,6 @@
20 20
 #include <QString>
21 21
 #include <QList>
22 22
 #include <QDir>
23  
-#include <QFile>
24 23
 #include <QXmlStreamWriter>
25 24
 #include <QDebug>
26 25
 #include "report.h"
2  gui/xmlreportv1.h
@@ -21,8 +21,6 @@
21 21
 
22 22
 #include <QObject>
23 23
 #include <QString>
24  
-#include <QStringList>
25  
-#include <QFile>
26 24
 #include <QXmlStreamReader>
27 25
 #include <QXmlStreamWriter>
28 26
 #include "xmlreport.h"
1  gui/xmlreportv2.cpp
@@ -20,7 +20,6 @@
20 20
 #include <QString>
21 21
 #include <QList>
22 22
 #include <QDir>
23  
-#include <QFile>
24 23
 #include <QXmlStreamWriter>
25 24
 #include <QDebug>
26 25
 #include "report.h"
3  gui/xmlreportv2.h
@@ -21,11 +21,8 @@
21 21
 
22 22
 #include <QObject>
23 23
 #include <QString>
24  
-#include <QStringList>
25  
-#include <QFile>
26 24
 #include <QXmlStreamReader>
27 25
 #include <QXmlStreamWriter>
28  
-#include "report.h"
29 26
 #include "xmlreport.h"
30 27
 
31 28
 /// @addtogroup GUI

0 notes on commit b1a768e

Please sign in to comment.
Something went wrong with that request. Please try again.