summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-17 22:43:52 +1300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-17 23:00:43 +1300
commit02d8dd5d13024830c99d92e8f981d6ee2051a7c9 (patch)
tree0da342f5a184cd01ac5b1cb8a6d4dea2b22fc7b1
parente0280048bcd9e602fb5073bc5f5526a5dffd1886 (diff)
downloadsubsurface-02d8dd5d13024830c99d92e8f981d6ee2051a7c9.tar.gz
Clean up the header files
Lots and lots and lots of header files were being included without being needed. This attempts to clean some of that crud up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp7
-rw-r--r--qt-ui/divecomputermanagementdialog.cpp2
-rw-r--r--qt-ui/divelistview.cpp21
-rw-r--r--qt-ui/divelogexportdialog.cpp8
-rw-r--r--qt-ui/divelogimportdialog.cpp8
-rw-r--r--qt-ui/divepicturewidget.cpp6
-rw-r--r--qt-ui/diveplanner.cpp17
-rw-r--r--qt-ui/diveshareexportdialog.cpp5
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp8
-rw-r--r--qt-ui/filtermodels.cpp3
-rw-r--r--qt-ui/globe.cpp11
-rw-r--r--qt-ui/groupedlineedit.cpp10
-rw-r--r--qt-ui/kmessagewidget.cpp1
-rw-r--r--qt-ui/maintab.cpp16
-rw-r--r--qt-ui/mainwindow.cpp25
-rw-r--r--qt-ui/modeldelegates.cpp17
-rw-r--r--qt-ui/preferences.cpp1
-rw-r--r--qt-ui/printdialog.cpp6
-rw-r--r--qt-ui/printlayout.cpp9
-rw-r--r--qt-ui/printoptions.cpp2
-rw-r--r--qt-ui/profile/animationfunctions.cpp2
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp7
-rw-r--r--qt-ui/profile/diveeventitem.cpp3
-rw-r--r--qt-ui/profile/divelineitem.cpp2
-rw-r--r--qt-ui/profile/divepixmapitem.cpp5
-rw-r--r--qt-ui/profile/diveplotdatamodel.cpp2
-rw-r--r--qt-ui/profile/diveprofileitem.cpp9
-rw-r--r--qt-ui/profile/divetextitem.cpp9
-rw-r--r--qt-ui/profile/divetooltipitem.cpp6
-rw-r--r--qt-ui/profile/profilewidget2.cpp11
-rw-r--r--qt-ui/profile/ruleritem.cpp11
-rw-r--r--qt-ui/profile/tankitem.cpp2
-rw-r--r--qt-ui/simplewidgets.cpp19
-rw-r--r--qt-ui/starwidget.cpp6
-rw-r--r--qt-ui/subsurfacewebservices.cpp9
-rw-r--r--qt-ui/tableview.cpp4
-rw-r--r--qt-ui/tagwidget.cpp6
-rw-r--r--qt-ui/updatemanager.cpp1
-rw-r--r--qt-ui/usermanual.cpp1
-rw-r--r--qt-ui/usersurvey.cpp1
40 files changed, 12 insertions, 287 deletions
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 6b50cdadb..bc9ff5e2f 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -1,17 +1,10 @@
#include "configuredivecomputerdialog.h"
-#include "divecomputer.h"
-#include "libdivecomputer.h"
#include "helpers.h"
-#include "display.h"
-#include "divelist.h"
-#include "configuredivecomputer.h"
#include "mainwindow.h"
#include <QFileDialog>
#include <QMessageBox>
#include <QSettings>
-#include <QNetworkAccessManager>
-#include <QNetworkRequest>
#include <QNetworkReply>
struct product {
diff --git a/qt-ui/divecomputermanagementdialog.cpp b/qt-ui/divecomputermanagementdialog.cpp
index 567abd4d7..742facdcb 100644
--- a/qt-ui/divecomputermanagementdialog.cpp
+++ b/qt-ui/divecomputermanagementdialog.cpp
@@ -1,7 +1,5 @@
#include "divecomputermanagementdialog.h"
-#include "models.h"
#include "mainwindow.h"
-#include "qthelper.h"
#include "helpers.h"
#include <QMessageBox>
#include <QShortcut>
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index d6f52c646..d4e744237 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -5,31 +5,12 @@
*
*/
#include "divelistview.h"
-#include "models.h"
#include "filtermodels.h"
#include "modeldelegates.h"
#include "mainwindow.h"
-#include "subsurfacewebservices.h"
-#include "divelogexportdialog.h"
-#include "../display.h"
-#include "exif.h"
-#include "../file.h"
-#include <QApplication>
-#include <QHeaderView>
-#include <QDebug>
#include <QSettings>
-#include <QKeyEvent>
-#include <QSortFilterProxyModel>
-#include <QAction>
-#include <QLineEdit>
-#include <QKeyEvent>
-#include <QMenu>
#include <QFileDialog>
-#include <string>
-#include <iostream>
-#include <QHttpMultiPart>
-#include "socialnetworks.h"
-#include "../qthelper.h"
+#include "qthelper.h"
// # Date Rtg Dpth Dur Tmp Wght Suit Cyl Gas SAC OTU CNS Loc
static int defaultWidth[] = { 70, 140, 90, 50, 50, 50, 50, 70, 50, 50, 70, 50, 50, 500};
diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp
index 8f5d720e3..0193ea5d9 100644
--- a/qt-ui/divelogexportdialog.cpp
+++ b/qt-ui/divelogexportdialog.cpp
@@ -1,21 +1,13 @@
#include <QFileDialog>
-#include <QString>
#include <QShortcut>
-#include <QAbstractButton>
-#include <QTextStream>
#include <QSettings>
-#include <QDir>
-#include <QDebug>
-#include "mainwindow.h"
#include "divelogexportdialog.h"
#include "diveshareexportdialog.h"
#include "ui_divelogexportdialog.h"
#include "subsurfacewebservices.h"
#include "worldmap-save.h"
#include "save-html.h"
-#include "helpers.h"
-#include "statistics.h"
#define GET_UNIT(name, field, f, t) \
v = settings.value(QString(name)); \
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index 18020c9f1..681241a72 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -1,15 +1,9 @@
-#include <QtDebug>
-#include <QFileDialog>
-#include <QShortcut>
#include "divelogimportdialog.h"
#include "mainwindow.h"
#include "ui_divelogimportdialog.h"
-#include <QAbstractListModel>
-#include <QAbstractTableModel>
-#include <QMouseEvent>
+#include <QShortcut>
#include <QDrag>
#include <QMimeData>
-#include <QFile>
static QString subsurface_mimedata = "subsurface/csvcolumns";
static QString subsurface_index = "subsurface/csvindex";
diff --git a/qt-ui/divepicturewidget.cpp b/qt-ui/divepicturewidget.cpp
index d42afefbf..92695b6a6 100644
--- a/qt-ui/divepicturewidget.cpp
+++ b/qt-ui/divepicturewidget.cpp
@@ -1,11 +1,9 @@
#include "divepicturewidget.h"
#include "metrics.h"
-
-#include <dive.h>
-#include <divelist.h>
+#include "dive.h"
+#include "divelist.h"
#include <QtConcurrentMap>
#include <QDir>
-#include <QHash>
DivePictureModel *DivePictureModel::instance()
{
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index bf7af7fd1..44ca6baf5 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -1,31 +1,14 @@
#include "diveplanner.h"
-#include "graphicsview-common.h"
-#include "models.h"
#include "modeldelegates.h"
#include "mainwindow.h"
-#include "maintab.h"
-#include "tableview.h"
-
-#include "dive.h"
-#include "divelist.h"
#include "planner.h"
-#include "display.h"
#include "helpers.h"
-#include <QMouseEvent>
-#include <QDebug>
#include <QGraphicsSceneMouseEvent>
#include <QMessageBox>
-#include <QListView>
-#include <QModelIndex>
#include <QSettings>
-#include <QTableView>
-#include <QColor>
#include <QShortcut>
-#include <algorithm>
-#include <string.h>
-
#define TIME_INITIAL_MAX 30
#define MAX_DEPTH M_OR_FT(150, 450)
diff --git a/qt-ui/diveshareexportdialog.cpp b/qt-ui/diveshareexportdialog.cpp
index 8f817ae63..3ce2e0bb4 100644
--- a/qt-ui/diveshareexportdialog.cpp
+++ b/qt-ui/diveshareexportdialog.cpp
@@ -2,11 +2,10 @@
#include "ui_diveshareexportdialog.h"
#include "mainwindow.h"
#include "save-html.h"
-#include "qt-ui/usersurvey.h"
-#include "qt-ui/subsurfacewebservices.h"
+#include "usersurvey.h"
+#include "subsurfacewebservices.h"
#include <QDesktopServices>
-#include <QUrl>
#include <QSettings>
DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) :
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index f382e0b2b..c66792550 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -1,15 +1,7 @@
#include "downloadfromdivecomputer.h"
-#include "divecomputer.h"
-#include "libdivecomputer.h"
#include "helpers.h"
-#include "display.h"
-#include "divelist.h"
#include "mainwindow.h"
-#include <cstdlib>
-#include <QThread>
-#include <QDebug>
-#include <QStringListModel>
#include <QTimer>
#include <QFileDialog>
#include <QMessageBox>
diff --git a/qt-ui/filtermodels.cpp b/qt-ui/filtermodels.cpp
index aaace6586..e2597a634 100644
--- a/qt-ui/filtermodels.cpp
+++ b/qt-ui/filtermodels.cpp
@@ -1,8 +1,5 @@
#include "filtermodels.h"
-#include "dive.h"
-#include "models.h"
#include "mainwindow.h"
-#include "display.h"
#define CREATE_INSTANCE_METHOD( CLASS ) \
CLASS *CLASS::instance() \
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index bbdf19722..c2bbeb415 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -1,14 +1,7 @@
#include "globe.h"
#ifndef NO_MARBLE
-#include "kmessagewidget.h"
#include "mainwindow.h"
-#include "ui_mainwindow.h"
-#include "dive.h"
-#include "divelist.h"
#include "helpers.h"
-#include "display.h"
-
-#include <QDebug>
#include <QTimer>
#include <marble/AbstractFloatItem.h>
@@ -17,7 +10,7 @@
#include <marble/MarbleModel.h>
#include <marble/MarbleDirs.h>
#include <marble/MapThemeManager.h>
-#include <marble/GeoDataLineString.h>
+
#ifdef MARBLE_SUBSURFACE_BRANCH
#include <marble/MarbleDebug.h>
#endif
@@ -26,8 +19,6 @@
#else
#include <marble/GeoDataTreeModel.h>
#endif
-#include <QMouseEvent>
-#include <QMessageBox>
// as of Marble 4.10 (which has MARBLE_VERSION 0x001000) zoomView is
// deprecated and has been replaced by setZoom with the same function signature
diff --git a/qt-ui/groupedlineedit.cpp b/qt-ui/groupedlineedit.cpp
index be93f24d6..71abe72a0 100644
--- a/qt-ui/groupedlineedit.cpp
+++ b/qt-ui/groupedlineedit.cpp
@@ -28,19 +28,9 @@
#include "groupedlineedit.h"
-#include <QStyleOptionFrameV3>
-#include <QFontMetrics>
-#include <QApplication>
#include <QScrollBar>
-#include <QTextDocument>
#include <QTextBlock>
-#include <QTextLayout>
-#include <QTextLine>
#include <QPainter>
-#include <QPainterPath>
-#include <QBrush>
-#include <QColor>
-#include <QPalette>
struct GroupedLineEdit::Private {
struct Block {
diff --git a/qt-ui/kmessagewidget.cpp b/qt-ui/kmessagewidget.cpp
index 6059d707e..bfa8c2745 100644
--- a/qt-ui/kmessagewidget.cpp
+++ b/qt-ui/kmessagewidget.cpp
@@ -19,7 +19,6 @@
*/
#include "kmessagewidget.h"
-#include <QEvent>
#include <QGridLayout>
#include <QDialogButtonBox>
#include <QLabel>
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 629b36ad7..3c00a1bed 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -6,28 +6,16 @@
*/
#include "maintab.h"
#include "mainwindow.h"
-#include "../helpers.h"
-#include "../statistics.h"
-#include "divelistview.h"
+#include "helpers.h"
+#include "statistics.h"
#include "modeldelegates.h"
-#include "globe.h"
-#include "diveplanner.h"
-#include "divelist.h"
-#include "qthelper.h"
-#include "display.h"
-#include "divepicturewidget.h"
#if defined(FBSUPPORT)
#include "socialnetworks.h"
#endif
-#include <QLabel>
#include <QCompleter>
-#include <QDebug>
-#include <QSet>
#include <QSettings>
-#include <QTableView>
-#include <QPalette>
#include <QScrollBar>
#include <QShortcut>
#include <QMessageBox>
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 9186b7a0a..8835bb8e3 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -5,45 +5,20 @@
*/
#include "mainwindow.h"
-#include <QVBoxLayout>
#include <QFileDialog>
#include <QMessageBox>
-#include <QtDebug>
-#include <QDateTime>
-#include <QSettings>
-#include <QCloseEvent>
-#include <QApplication>
-#include <QFontMetrics>
-#include <QTableView>
#include <QDesktopWidget>
-#include <QDesktopServices>
-#include <QStringList>
#include <QSettings>
#include <QShortcut>
#include <QToolBar>
-#include <fcntl.h>
-#include "divelistview.h"
-#include "starwidget.h"
#include "ssrf-version.h"
-#include "dive.h"
-#include "display.h"
-#include "divelist.h"
-#include "pref.h"
-#include "helpers.h"
-#include "modeldelegates.h"
-#include "models.h"
#include "downloadfromdivecomputer.h"
#include "preferences.h"
#include "subsurfacewebservices.h"
#include "divecomputermanagementdialog.h"
-#include "simplewidgets.h"
-#include "diveplanner.h"
#include "about.h"
-#include "worldmap-save.h"
#include "updatemanager.h"
#include "planner.h"
-#include "configuredivecomputerdialog.h"
-#include "statistics/statisticswidget.h"
#include "filtermodels.h"
#ifndef NO_PRINTING
#include <QPrintDialog>
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index d2bdadc3b..cd195cc4f 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -1,26 +1,9 @@
#include "modeldelegates.h"
#include "dive.h"
-#include "divelist.h"
-#include "starwidget.h"
-#include "models.h"
-#include "diveplanner.h"
-#include "simplewidgets.h"
#include "gettextfromc.h"
-#include "profile/profilewidget2.h"
#include "mainwindow.h"
-#include <QtDebug>
-#include <QPainter>
-#include <QSortFilterProxyModel>
-#include <QStyle>
-#include <QStyleOption>
-#include <QComboBox>
#include <QCompleter>
-#include <QLineEdit>
-#include <QKeyEvent>
-#include <QAbstractItemView>
-#include <QApplication>
-#include <QTextDocument>
QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index a6fe549ba..334b2a1d2 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -1,7 +1,6 @@
#include "preferences.h"
#include "mainwindow.h"
#include <QSettings>
-#include <QDebug>
#include <QFileDialog>
#include <QMessageBox>
#include <QShortcut>
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index df3b2f5b7..fbf71c453 100644
--- a/qt-ui/printdialog.cpp
+++ b/qt-ui/printdialog.cpp
@@ -3,16 +3,10 @@
#include "printlayout.h"
#include "mainwindow.h"
-#include <QDebug>
-#include <QPushButton>
#include <QProgressBar>
-#include <QVBoxLayout>
-#include <QHBoxLayout>
#include <QPrintPreviewDialog>
#include <QPrintDialog>
#include <QShortcut>
-#include <QPrinterInfo>
-#include <QMessageBox>
#include <QSettings>
#if QT_VERSION >= 0x050300
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index 63819ad48..a347e1fdb 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -1,20 +1,11 @@
#include <QtCore/qmath.h>
-#include <QDebug>
-#include <QPainter>
#include <QDesktopWidget>
-#include <QApplication>
-#include <QTableView>
-#include <QHeaderView>
-#include <QPointer>
#include <QPicture>
#include <QMessageBox>
#include "mainwindow.h"
-#include "../dive.h"
-#include "../display.h"
#include "printdialog.h"
#include "printlayout.h"
-#include "models.h"
#include "modeldelegates.h"
PrintLayout::PrintLayout(PrintDialog *dialogPtr, QPrinter *printerPtr, struct print_options *optionsPtr)
diff --git a/qt-ui/printoptions.cpp b/qt-ui/printoptions.cpp
index 21e299930..d3e148c69 100644
--- a/qt-ui/printoptions.cpp
+++ b/qt-ui/printoptions.cpp
@@ -1,5 +1,5 @@
#include "printoptions.h"
-#include "../display.h"
+#include "display.h"
PrintOptions::PrintOptions(QWidget *parent, struct print_options *printOpt)
{
diff --git a/qt-ui/profile/animationfunctions.cpp b/qt-ui/profile/animationfunctions.cpp
index fb1c85f8d..a19d50c9d 100644
--- a/qt-ui/profile/animationfunctions.cpp
+++ b/qt-ui/profile/animationfunctions.cpp
@@ -1,8 +1,6 @@
#include "animationfunctions.h"
-#include "dive.h"
#include "pref.h"
#include <QPropertyAnimation>
-#include <QPointF>
namespace Animations {
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index aaa85c634..467a8b978 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -1,17 +1,10 @@
#include "divecartesianaxis.h"
-#include "divelineitem.h"
#include "divetextitem.h"
#include "helpers.h"
#include "preferences.h"
#include "diveplotdatamodel.h"
#include "animationfunctions.h"
#include "mainwindow.h"
-#include <QPen>
-#include <QGraphicsScene>
-#include <QDebug>
-#include <QGraphicsView>
-#include <QStyleOption>
-#include <QSettings>
static QPen gridPen()
{
diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp
index 1a5e29dda..2ec842179 100644
--- a/qt-ui/profile/diveeventitem.cpp
+++ b/qt-ui/profile/diveeventitem.cpp
@@ -3,10 +3,7 @@
#include "divecartesianaxis.h"
#include "animationfunctions.h"
#include "libdivecomputer.h"
-#include "dive.h"
-#include "planner.h"
#include "profile.h"
-#include <QDebug>
#include "gettextfromc.h"
#include "metrics.h"
diff --git a/qt-ui/profile/divelineitem.cpp b/qt-ui/profile/divelineitem.cpp
index 863cd6218..f9e288a44 100644
--- a/qt-ui/profile/divelineitem.cpp
+++ b/qt-ui/profile/divelineitem.cpp
@@ -1,6 +1,4 @@
#include "divelineitem.h"
-#include "animationfunctions.h"
-#include <QPropertyAnimation>
DiveLineItem::DiveLineItem(QGraphicsItem *parent) : QGraphicsLineItem(parent)
{
diff --git a/qt-ui/profile/divepixmapitem.cpp b/qt-ui/profile/divepixmapitem.cpp
index 8aff5315d..c9129761e 100644
--- a/qt-ui/profile/divepixmapitem.cpp
+++ b/qt-ui/profile/divepixmapitem.cpp
@@ -3,12 +3,7 @@
#include <divepicturewidget.h>
#include <preferences.h>
-#include <QPen>
-#include <QBrush>
-#include <QGraphicsDropShadowEffect>
#include <QDesktopServices>
-#include <QGraphicsScene>
-#include <QGraphicsSceneMouseEvent>
#include <QGraphicsView>
#include <QUrl>
diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp
index e60dd9ddb..9c0edc079 100644
--- a/qt-ui/profile/diveplotdatamodel.cpp
+++ b/qt-ui/profile/diveplotdatamodel.cpp
@@ -1,10 +1,8 @@
#include "diveplotdatamodel.h"
#include "dive.h"
-#include "display.h"
#include "profile.h"
#include "graphicsview-common.h"
#include "divelist.h"
-#include <QDebug>
DivePlotDataModel::DivePlotDataModel(QObject *parent) : QAbstractTableModel(parent), diveId(0)
{
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index 490f045fd..66faf982d 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -1,24 +1,15 @@
#include "diveprofileitem.h"
#include "diveplotdatamodel.h"
#include "divecartesianaxis.h"
-#include "graphicsview-common.h"
#include "divetextitem.h"
-#include "profilewidget2.h"
#include "animationfunctions.h"
#include "dive.h"
#include "profile.h"
#include "preferences.h"
#include "helpers.h"
-#include "diveplanner.h"
#include "libdivecomputer/parser.h"
#include "mainwindow.h"
-#include <QPen>
-#include <QPainter>
-#include <QLinearGradient>
-#include <QDebug>
-#include <QApplication>
-#include <QGraphicsItem>
#include <QSettings>
AbstractProfilePolygonItem::AbstractProfilePolygonItem() : QObject(), QGraphicsPolygonItem(), hAxis(NULL), vAxis(NULL), dataModel(NULL), hDataColumn(-1), vDataColumn(-1)
diff --git a/qt-ui/profile/divetextitem.cpp b/qt-ui/profile/divetextitem.cpp
index 761f0e6f7..85e046638 100644
--- a/qt-ui/profile/divetextitem.cpp
+++ b/qt-ui/profile/divetextitem.cpp
@@ -1,15 +1,6 @@
#include "divetextitem.h"
-#include "animationfunctions.h"
#include "mainwindow.h"
-#include <QPropertyAnimation>
-#include <QApplication>
-#include <QFont>
-#include <QFontMetrics>
-#include <QBrush>
-#include <QPen>
-#include <QDebug>
-
DiveTextItem::DiveTextItem(QGraphicsItem *parent) : QGraphicsItemGroup(parent),
internalAlignFlags(Qt::AlignHCenter | Qt::AlignVCenter),
textBackgroundItem(new QGraphicsPathItem(this)),
diff --git a/qt-ui/profile/divetooltipitem.cpp b/qt-ui/profile/divetooltipitem.cpp
index e89feff9c..d4818422b 100644
--- a/qt-ui/profile/divetooltipitem.cpp
+++ b/qt-ui/profile/divetooltipitem.cpp
@@ -1,19 +1,13 @@
#include "divetooltipitem.h"
#include "divecartesianaxis.h"
-#include "profilewidget2.h"
#include "dive.h"
#include "profile.h"
#include "membuffer.h"
#include "metrics.h"
#include <QPropertyAnimation>
-#include <QGraphicsSceneMouseEvent>
-#include <QPen>
-#include <QBrush>
-#include <QGraphicsScene>
#include <QSettings>
#include <QGraphicsView>
#include <QStyleOptionGraphicsItem>
-#include <QDebug>
#define PORT_IN_PROGRESS 1
#ifdef PORT_IN_PROGRESS
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index b161032d4..516b14c2f 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -1,27 +1,16 @@
#include "profilewidget2.h"
#include "diveplotdatamodel.h"
-#include "divepixmapitem.h"
-#include "diverectitem.h"
-#include "divecartesianaxis.h"
-#include "diveprofileitem.h"
#include "helpers.h"
#include "profile.h"
#include "diveeventitem.h"
#include "divetextitem.h"
#include "divetooltipitem.h"
-#include "animationfunctions.h"
#include "planner.h"
#include "device.h"
#include "ruleritem.h"
#include "tankitem.h"
-#include "dive.h"
#include "pref.h"
#include <libdivecomputer/parser.h>
-#include <QSignalTransition>
-#include <QPropertyAnimation>
-#include <QMenu>
-#include <QContextMenuEvent>
-#include <QDebug>
#include <QScrollBar>
#include <QtCore/qmath.h>
#include <QMessageBox>
diff --git a/qt-ui/profile/ruleritem.cpp b/qt-ui/profile/ruleritem.cpp
index d38e88822..c88a3353d 100644
--- a/qt-ui/profile/ruleritem.cpp
+++ b/qt-ui/profile/ruleritem.cpp
@@ -1,21 +1,10 @@
#include "ruleritem.h"
-#include "divetextitem.h"
-#include "profilewidget2.h"
#include "preferences.h"
#include "mainwindow.h"
-#include <QFont>
-#include <QFontMetrics>
-#include <QPainter>
-#include <QGraphicsScene>
-#include <QGraphicsView>
#include <qgraphicssceneevent.h>
-#include <QDebug>
-
-#include <stdint.h>
#include "profile.h"
-#include "display.h"
RulerNodeItem2::RulerNodeItem2() : entry(NULL), ruler(NULL)
{
diff --git a/qt-ui/profile/tankitem.cpp b/qt-ui/profile/tankitem.cpp
index 59acb28e0..48b586dd5 100644
--- a/qt-ui/profile/tankitem.cpp
+++ b/qt-ui/profile/tankitem.cpp
@@ -2,8 +2,6 @@
#include "diveplotdatamodel.h"
#include "divetextitem.h"
#include "profile.h"
-#include <QGradient>
-#include <QDebug>
#include <QPen>
TankItem::TankItem(QObject *parent) :
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index 76400ef41..d258fe7af 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -1,31 +1,14 @@
#include "simplewidgets.h"
#include "filtermodels.h"
-#include <QLabel>
#include <QProcess>
-#include <QStringList>
-#include <QDebug>
#include <QFileDialog>
#include <QShortcut>
#include <QCalendarWidget>
-#include <QSortFilterProxyModel>
-#include <QToolButton>
-#include <QToolBar>
-#include <QUrlQuery>
-#include <QJsonDocument>
-#include <QJsonObject>
-#include <QJsonArray>
-#include <QJsonValue>
-#include <QNetworkReply>
-#include <QNetworkRequest>
-#include <QNetworkAccessManager>
-#include "exif.h"
-#include "dive.h"
+
#include "file.h"
-#include "display.h"
#include "mainwindow.h"
#include "helpers.h"
-#include "ui_filterwidget.h"
#include "libdivecomputer/parser.h"
diff --git a/qt-ui/starwidget.cpp b/qt-ui/starwidget.cpp
index 005396761..508d9a746 100644
--- a/qt-ui/starwidget.cpp
+++ b/qt-ui/starwidget.cpp
@@ -1,13 +1,7 @@
#include "starwidget.h"
#include "metrics.h"
#include <QSvgRenderer>
-#include <QPainter>
-#include <QPaintEvent>
-#include <QDebug>
#include <QMouseEvent>
-#include <unistd.h>
-#include <QStyle>
-#include <QStyleOption>
#include "simplewidgets.h"
QImage StarWidget::activeStar;
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index c98413d12..597fe03b6 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -2,25 +2,16 @@
#include "webservice.h"
#include "mainwindow.h"
#include "usersurvey.h"
-#include <libxml/parser.h>
-#include <zip.h>
#include <errno.h>
#include <QDir>
#include <QHttpMultiPart>
#include <QMessageBox>
-#include <QNetworkAccessManager>
-#include <QNetworkReply>
-#include <QDebug>
#include <QSettings>
#include <QXmlStreamReader>
#include <qdesktopservices.h>
#include <QShortcut>
-#include "dive.h"
-#include "divelist.h"
-#include "display.h"
-
#ifdef Q_OS_UNIX
#include <unistd.h> // for dup(2)
#endif
diff --git a/qt-ui/tableview.cpp b/qt-ui/tableview.cpp
index a07a70dba..78a0bce10 100644
--- a/qt-ui/tableview.cpp
+++ b/qt-ui/tableview.cpp
@@ -3,11 +3,7 @@
#include "modeldelegates.h"
#include <QPushButton>
-#include <QLayout>
-#include <QFile>
-#include <QTextStream>
#include <QSettings>
-#include <QStyle>
TableView::TableView(QWidget *parent) : QGroupBox(parent)
{
diff --git a/qt-ui/tagwidget.cpp b/qt-ui/tagwidget.cpp
index 54b488aa0..bfe535447 100644
--- a/qt-ui/tagwidget.cpp
+++ b/qt-ui/tagwidget.cpp
@@ -1,10 +1,6 @@
#include "tagwidget.h"
-#include <QPair>
-#include <QAbstractItemView>
-#include <QSettings>
-#include <QCompleter>
-#include <QFont>
#include "mainwindow.h"
+#include <QCompleter>
TagWidget::TagWidget(QWidget *parent) : GroupedLineEdit(parent), m_completer(NULL), lastFinishedTag(false)
{
diff --git a/qt-ui/updatemanager.cpp b/qt-ui/updatemanager.cpp
index d672b2dbb..865a54127 100644
--- a/qt-ui/updatemanager.cpp
+++ b/qt-ui/updatemanager.cpp
@@ -2,7 +2,6 @@
#include "usersurvey.h"
#include <QtNetwork>
#include <QMessageBox>
-#include <QDateTime>
#include "subsurfacewebservices.h"
#include "ssrf-version.h"
#include "mainwindow.h"
diff --git a/qt-ui/usermanual.cpp b/qt-ui/usermanual.cpp
index b6e6f09d6..ab6475155 100644
--- a/qt-ui/usermanual.cpp
+++ b/qt-ui/usermanual.cpp
@@ -1,7 +1,6 @@
#include <QDesktopServices>
#include <QShortcut>
#include <QFile>
-#include <QDebug>
#include "usermanual.h"
diff --git a/qt-ui/usersurvey.cpp b/qt-ui/usersurvey.cpp
index a8916c990..1beb186ad 100644
--- a/qt-ui/usersurvey.cpp
+++ b/qt-ui/usersurvey.cpp
@@ -1,6 +1,5 @@
#include <QShortcut>
#include <QMessageBox>
-#include <QDebug>
#include <QSettings>
#include "usersurvey.h"