diff options
author | Thiago Macieira <thiago@macieira.org> | 2013-10-03 11:54:24 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-10-03 12:13:15 -0700 |
commit | f0f76056ac3982783ab3dfe94d77ba5d25e19957 (patch) | |
tree | 329586844b768750e2932e90ffb0acf5336f1598 | |
parent | ab7d96c96f1a18e2c0e1e684586eac2f47a879dd (diff) | |
download | subsurface-f0f76056ac3982783ab3dfe94d77ba5d25e19957.tar.gz |
Include the ui_*.h headers in the main headers.
This means we can also remove the forward declarations.
This is the first step in removing the memory allocation for the ui
sub-classes. Without the second step, this commit is just making the
compilation time increase for no good reason :-)
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/about.cpp | 1 | ||||
-rw-r--r-- | qt-ui/about.h | 5 | ||||
-rw-r--r-- | qt-ui/divecomputermanagementdialog.cpp | 1 | ||||
-rw-r--r-- | qt-ui/divecomputermanagementdialog.h | 4 | ||||
-rw-r--r-- | qt-ui/diveplanner.cpp | 1 | ||||
-rw-r--r-- | qt-ui/diveplanner.h | 5 | ||||
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 1 | ||||
-rw-r--r-- | qt-ui/downloadfromdivecomputer.h | 4 | ||||
-rw-r--r-- | qt-ui/maintab.cpp | 1 | ||||
-rw-r--r-- | qt-ui/maintab.h | 5 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 1 | ||||
-rw-r--r-- | qt-ui/mainwindow.h | 7 | ||||
-rw-r--r-- | qt-ui/preferences.cpp | 1 | ||||
-rw-r--r-- | qt-ui/preferences.h | 5 | ||||
-rw-r--r-- | qt-ui/printoptions.cpp | 1 | ||||
-rw-r--r-- | qt-ui/printoptions.h | 4 | ||||
-rw-r--r-- | qt-ui/simplewidgets.cpp | 2 | ||||
-rw-r--r-- | qt-ui/simplewidgets.h | 2 | ||||
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 1 | ||||
-rw-r--r-- | qt-ui/tableview.cpp | 1 | ||||
-rw-r--r-- | qt-ui/tableview.h | 5 |
21 files changed, 14 insertions, 44 deletions
diff --git a/qt-ui/about.cpp b/qt-ui/about.cpp index 821835f3e..56fae4b03 100644 --- a/qt-ui/about.cpp +++ b/qt-ui/about.cpp @@ -1,5 +1,4 @@ #include "about.h" -#include "ui_about.h" #include "version.h" #include <QDebug> #include <QDialogButtonBox> diff --git a/qt-ui/about.h b/qt-ui/about.h index 6636b0e33..2e6db600d 100644 --- a/qt-ui/about.h +++ b/qt-ui/about.h @@ -3,10 +3,7 @@ #include <QDialog> #include <QPushButton> - -namespace Ui { - class SubsurfaceAbout; -} +#include "ui_about.h" class SubsurfaceAbout : public QDialog { Q_OBJECT diff --git a/qt-ui/divecomputermanagementdialog.cpp b/qt-ui/divecomputermanagementdialog.cpp index beb0ea45e..946481087 100644 --- a/qt-ui/divecomputermanagementdialog.cpp +++ b/qt-ui/divecomputermanagementdialog.cpp @@ -1,6 +1,5 @@ #include "divecomputermanagementdialog.h" #include "models.h" -#include "ui_divecomputermanagementdialog.h" #include "mainwindow.h" #include <QMessageBox> #include "../qthelper.h" diff --git a/qt-ui/divecomputermanagementdialog.h b/qt-ui/divecomputermanagementdialog.h index 72d48cd2a..85b9cb713 100644 --- a/qt-ui/divecomputermanagementdialog.h +++ b/qt-ui/divecomputermanagementdialog.h @@ -1,12 +1,10 @@ #ifndef DIVECOMPUTERMANAGEMENTDIALOG_H #define DIVECOMPUTERMANAGEMENTDIALOG_H #include <QDialog> +#include "ui_divecomputermanagementdialog.h" class QModelIndex; class DiveComputerModel; -namespace Ui{ - class DiveComputerManagementDialog; -}; class DiveComputerManagementDialog : public QDialog{ Q_OBJECT diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 4fbdc5eb0..12b2d54e9 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -2,7 +2,6 @@ #include "graphicsview-common.h" #include "models.h" #include "modeldelegates.h" -#include "ui_diveplanner.h" #include "mainwindow.h" #include "maintab.h" #include "tableview.h" diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index e9fe2051a..7d9bb9188 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -8,10 +8,7 @@ #include <QDateTime> #include "dive.h" - -namespace Ui{ - class DivePlanner; -}; +#include "ui_diveplanner.h" class QListView; class QStringListModel; diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index eaf8efd70..c10ec90be 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -1,5 +1,4 @@ #include "downloadfromdivecomputer.h" -#include "ui_downloadfromdivecomputer.h" #include "../libdivecomputer.h" #include "../helpers.h" diff --git a/qt-ui/downloadfromdivecomputer.h b/qt-ui/downloadfromdivecomputer.h index bef3d541d..2cd2975b3 100644 --- a/qt-ui/downloadfromdivecomputer.h +++ b/qt-ui/downloadfromdivecomputer.h @@ -6,10 +6,8 @@ #include <QHash> #include <QMap> #include "../libdivecomputer.h" +#include "ui_downloadfromdivecomputer.h" -namespace Ui{ - class DownloadFromDiveComputer; -} struct device_data_t; class DownloadThread : public QThread{ diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 4512005f2..e9fc2aea7 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -5,7 +5,6 @@ * */ #include "maintab.h" -#include "ui_maintab.h" #include "mainwindow.h" #include "../helpers.h" #include "../statistics.h" diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h index 5450c2d0e..f1a981517 100644 --- a/qt-ui/maintab.h +++ b/qt-ui/maintab.h @@ -12,13 +12,10 @@ #include <QMap> #include "models.h" +#include "ui_maintab.h" class QCompleter; struct dive; -namespace Ui -{ - class MainTab; -} struct NotesBackup{ QString airtemp; diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 8f2f8233d..e32256982 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -4,7 +4,6 @@ * classes for the main UI window in Subsurface */ #include "mainwindow.h" -#include "ui_mainwindow.h" #include <QVBoxLayout> #include <QFileDialog> diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 7fc03b614..275416c7a 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -10,15 +10,12 @@ #include <QMainWindow> #include <QAction> +#include "ui_mainwindow.h" + struct DiveList; class QSortFilterProxyModel; class DiveTripModel; -namespace Ui -{ - class MainWindow; -} - class DiveInfo; class DiveNotes; class Stats; diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index f206224a8..0d49d4928 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -1,5 +1,4 @@ #include "preferences.h" -#include "ui_preferences.h" #include <QSettings> #include <QDebug> diff --git a/qt-ui/preferences.h b/qt-ui/preferences.h index 171c41e61..0d40b4059 100644 --- a/qt-ui/preferences.h +++ b/qt-ui/preferences.h @@ -5,9 +5,8 @@ #include "../dive.h" #include "../pref.h" -namespace Ui{ -class PreferencesDialog; -} +#include "ui_preferences.h" + class QAbstractButton; class PreferencesDialog :public QDialog{ diff --git a/qt-ui/printoptions.cpp b/qt-ui/printoptions.cpp index cd169d3f4..437eb3f9e 100644 --- a/qt-ui/printoptions.cpp +++ b/qt-ui/printoptions.cpp @@ -1,5 +1,4 @@ #include "printoptions.h" -#include "ui_printoptions.h" #include "../display.h" PrintOptions::PrintOptions(QWidget *parent, struct options *printOpt) diff --git a/qt-ui/printoptions.h b/qt-ui/printoptions.h index cc0f4f6d6..86d9ba37d 100644 --- a/qt-ui/printoptions.h +++ b/qt-ui/printoptions.h @@ -5,9 +5,7 @@ #include <QSlider> #include <QLabel> -namespace Ui { - class PrintOptions; -}; +#include "ui_printoptions.h" // should be based on a custom QPrintDialog class class PrintOptions : public QWidget { diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index ce659c6cf..5b6c7a886 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -14,8 +14,6 @@ #include "../dive.h" -#include "ui_renumber.h" - class MinMaxAvgWidgetPrivate{ public: QLabel *avgIco, *avgValue; diff --git a/qt-ui/simplewidgets.h b/qt-ui/simplewidgets.h index cf79d19c7..32b299868 100644 --- a/qt-ui/simplewidgets.h +++ b/qt-ui/simplewidgets.h @@ -7,6 +7,8 @@ class QAbstractButton; #include <QWidget> #include <QDialog> +#include "ui_renumber.h" + class MinMaxAvgWidget : public QWidget{ Q_OBJECT Q_PROPERTY(double minimum READ minimum WRITE setMinimum) diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index cdf8ee6c8..cdc5f5aa1 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -1,5 +1,4 @@ #include "subsurfacewebservices.h" -#include "ui_subsurfacewebservices.h" #include "../webservice.h" #include <libxml/parser.h> diff --git a/qt-ui/tableview.cpp b/qt-ui/tableview.cpp index 02bf20843..b3d2c360d 100644 --- a/qt-ui/tableview.cpp +++ b/qt-ui/tableview.cpp @@ -1,5 +1,4 @@ #include "tableview.h" -#include "ui_tableview.h" #include "models.h" #include <QPushButton> diff --git a/qt-ui/tableview.h b/qt-ui/tableview.h index d22f466b5..0baac082a 100644 --- a/qt-ui/tableview.h +++ b/qt-ui/tableview.h @@ -7,13 +7,12 @@ */ #include <QWidget> +#include "ui_tableview.h" + class QPushButton; class QAbstractItemModel; class QModelIndex; class QTableView; -namespace Ui{ - class TableView; -}; class TableView : public QWidget { Q_OBJECT |