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>
This commit is contained in:
Thiago Macieira 2013-10-03 11:54:24 -07:00 committed by Dirk Hohndel
parent ab7d96c96f
commit f0f76056ac
21 changed files with 14 additions and 44 deletions

View file

@ -1,5 +1,4 @@
#include "about.h"
#include "ui_about.h"
#include "version.h"
#include <QDebug>
#include <QDialogButtonBox>

View file

@ -3,10 +3,7 @@
#include <QDialog>
#include <QPushButton>
namespace Ui {
class SubsurfaceAbout;
}
#include "ui_about.h"
class SubsurfaceAbout : public QDialog {
Q_OBJECT

View file

@ -1,6 +1,5 @@
#include "divecomputermanagementdialog.h"
#include "models.h"
#include "ui_divecomputermanagementdialog.h"
#include "mainwindow.h"
#include <QMessageBox>
#include "../qthelper.h"

View file

@ -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

View file

@ -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"

View file

@ -8,10 +8,7 @@
#include <QDateTime>
#include "dive.h"
namespace Ui{
class DivePlanner;
};
#include "ui_diveplanner.h"
class QListView;
class QStringListModel;

View file

@ -1,5 +1,4 @@
#include "downloadfromdivecomputer.h"
#include "ui_downloadfromdivecomputer.h"
#include "../libdivecomputer.h"
#include "../helpers.h"

View file

@ -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{

View file

@ -5,7 +5,6 @@
*
*/
#include "maintab.h"
#include "ui_maintab.h"
#include "mainwindow.h"
#include "../helpers.h"
#include "../statistics.h"

View file

@ -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;

View file

@ -4,7 +4,6 @@
* classes for the main UI window in Subsurface
*/
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QVBoxLayout>
#include <QFileDialog>

View file

@ -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;

View file

@ -1,5 +1,4 @@
#include "preferences.h"
#include "ui_preferences.h"
#include <QSettings>
#include <QDebug>

View file

@ -5,9 +5,8 @@
#include "../dive.h"
#include "../pref.h"
namespace Ui{
class PreferencesDialog;
}
#include "ui_preferences.h"
class QAbstractButton;
class PreferencesDialog :public QDialog{

View file

@ -1,5 +1,4 @@
#include "printoptions.h"
#include "ui_printoptions.h"
#include "../display.h"
PrintOptions::PrintOptions(QWidget *parent, struct options *printOpt)

View file

@ -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 {

View file

@ -14,8 +14,6 @@
#include "../dive.h"
#include "ui_renumber.h"
class MinMaxAvgWidgetPrivate{
public:
QLabel *avgIco, *avgValue;

View file

@ -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)

View file

@ -1,5 +1,4 @@
#include "subsurfacewebservices.h"
#include "ui_subsurfacewebservices.h"
#include "../webservice.h"
#include <libxml/parser.h>

View file

@ -1,5 +1,4 @@
#include "tableview.h"
#include "ui_tableview.h"
#include "models.h"
#include <QPushButton>

View file

@ -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