[vlc-commits] Qt: clean up includes and forward declare when possible

Ludovic Fauvet git at videolan.org
Mon Jan 5 17:27:27 CET 2015


vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Mon Jan  5 17:11:43 2015 +0100| [8003c414fc4f9b1e573ebe2ddbef45e7981a625d] | committer: Ludovic Fauvet

Qt: clean up includes and forward declare when possible

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8003c414fc4f9b1e573ebe2ddbef45e7981a625d
---

 modules/gui/qt4/components/epg/EPGChannels.cpp         |    4 ++++
 modules/gui/qt4/components/epg/EPGItem.cpp             |    2 --
 modules/gui/qt4/components/epg/EPGItem.hpp             |    1 -
 modules/gui/qt4/components/epg/EPGView.cpp             |    4 ++++
 modules/gui/qt4/components/epg/EPGView.hpp             |    6 +++++-
 modules/gui/qt4/components/epg/EPGWidget.cpp           |   16 ++++++++--------
 modules/gui/qt4/components/epg/EPGWidget.hpp           |   10 +++++-----
 modules/gui/qt4/components/playlist/playlist_model.cpp |    2 --
 modules/gui/qt4/dialogs/epg.cpp                        |    2 ++
 modules/gui/qt4/util/input_slider.cpp                  |    1 +
 modules/gui/qt4/util/input_slider.hpp                  |    2 +-
 11 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/modules/gui/qt4/components/epg/EPGChannels.cpp b/modules/gui/qt4/components/epg/EPGChannels.cpp
index 28616a9..902832d 100644
--- a/modules/gui/qt4/components/epg/EPGChannels.cpp
+++ b/modules/gui/qt4/components/epg/EPGChannels.cpp
@@ -20,6 +20,10 @@
  * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#include "qt4.hpp"
+
+#include <vlc_epg.h>
+
 #include "EPGChannels.hpp"
 #include "EPGView.hpp"
 
diff --git a/modules/gui/qt4/components/epg/EPGItem.cpp b/modules/gui/qt4/components/epg/EPGItem.cpp
index f932c05..b526bb5 100644
--- a/modules/gui/qt4/components/epg/EPGItem.cpp
+++ b/modules/gui/qt4/components/epg/EPGItem.cpp
@@ -24,10 +24,8 @@
 #include <QTransform>
 #include <QFont>
 #include <QFontMetrics>
-#include <QDebug>
 #include <QDateTime>
 #include <QFocusEvent>
-#include <QGraphicsScene>
 #include <QStyleOptionGraphicsItem>
 #include <QGraphicsSceneHoverEvent>
 #include <QStyle>
diff --git a/modules/gui/qt4/components/epg/EPGItem.hpp b/modules/gui/qt4/components/epg/EPGItem.hpp
index f5f9d9c..261e7a1 100644
--- a/modules/gui/qt4/components/epg/EPGItem.hpp
+++ b/modules/gui/qt4/components/epg/EPGItem.hpp
@@ -32,7 +32,6 @@
 
 class QPainter;
 class QString;
-
 class EPGView;
 
 class EPGItem : public QGraphicsItem
diff --git a/modules/gui/qt4/components/epg/EPGView.cpp b/modules/gui/qt4/components/epg/EPGView.cpp
index 2f4e9fb..b5b3128 100644
--- a/modules/gui/qt4/components/epg/EPGView.cpp
+++ b/modules/gui/qt4/components/epg/EPGView.cpp
@@ -21,6 +21,10 @@
  * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#include "qt4.hpp"
+
+#include <vlc_epg.h>
+
 #include "EPGView.hpp"
 #include "EPGItem.hpp"
 
diff --git a/modules/gui/qt4/components/epg/EPGView.hpp b/modules/gui/qt4/components/epg/EPGView.hpp
index 222deb6..7ca7575 100644
--- a/modules/gui/qt4/components/epg/EPGView.hpp
+++ b/modules/gui/qt4/components/epg/EPGView.hpp
@@ -24,7 +24,9 @@
 #ifndef EPGVIEW_H
 #define EPGVIEW_H
 
-#include "EPGItem.hpp"
+#include "qt4.hpp"
+
+#include <vlc_epg.h>
 
 #include <QGraphicsView>
 #include <QGraphicsScene>
@@ -33,6 +35,8 @@
 #include <QMutex>
 #include <QDateTime>
 
+class EPGItem;
+
 #define TRACKS_HEIGHT 60
 
 typedef QMap<QDateTime, EPGItem *> EPGEventByTimeQMap;
diff --git a/modules/gui/qt4/components/epg/EPGWidget.cpp b/modules/gui/qt4/components/epg/EPGWidget.cpp
index 2373094..c88e6df 100644
--- a/modules/gui/qt4/components/epg/EPGWidget.cpp
+++ b/modules/gui/qt4/components/epg/EPGWidget.cpp
@@ -21,21 +21,21 @@
  * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include "qt4.hpp"
 
-#include "EPGWidget.hpp"
+#include <vlc_epg.h>
+#include "input_manager.hpp"
 
 #include <QStackedWidget>
 #include <QVBoxLayout>
 #include <QScrollBar>
 #include <QLabel>
 #include <QStringList>
-#include "qt4.hpp"
-#include "input_manager.hpp"
-#include <vlc_common.h>
-#include <vlc_epg.h>
+
+#include "EPGWidget.hpp"
+#include "EPGRuler.hpp"
+#include "EPGView.hpp"
+#include "EPGChannels.hpp"
 
 EPGWidget::EPGWidget( QWidget *parent ) : QWidget( parent )
 {
diff --git a/modules/gui/qt4/components/epg/EPGWidget.hpp b/modules/gui/qt4/components/epg/EPGWidget.hpp
index 5f64865..fc3a86b 100644
--- a/modules/gui/qt4/components/epg/EPGWidget.hpp
+++ b/modules/gui/qt4/components/epg/EPGWidget.hpp
@@ -24,17 +24,17 @@
 #ifndef EPGWIDGET_H
 #define EPGWIDGET_H
 
-#include "EPGView.hpp"
-#include "EPGItem.hpp"
-#include "EPGRuler.hpp"
-#include "EPGChannels.hpp"
-
 #include <vlc_common.h>
 #include <vlc_epg.h>
 
 #include <QWidget>
 #include <QStackedWidget>
 
+class EPGView;
+class EPGItem;
+class EPGRuler;
+class EPGChannels;
+
 class EPGWidget : public QWidget
 {
     Q_OBJECT
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index c318e0f..2bf217a 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -39,9 +39,7 @@
 
 #include <assert.h>
 #include <QFont>
-#include <QTimer>
 #include <QAction>
-#include <QBuffer>
 
 /*************************************************************************
  * Playlist model implementation
diff --git a/modules/gui/qt4/dialogs/epg.cpp b/modules/gui/qt4/dialogs/epg.cpp
index bf2c1fb..de5b238 100644
--- a/modules/gui/qt4/dialogs/epg.cpp
+++ b/modules/gui/qt4/dialogs/epg.cpp
@@ -27,6 +27,7 @@
 #include "dialogs/epg.hpp"
 
 #include "components/epg/EPGWidget.hpp"
+#include "components/epg/EPGItem.hpp"
 #include <vlc_playlist.h>
 
 #include <QVBoxLayout>
@@ -37,6 +38,7 @@
 #include <QTextEdit>
 #include <QDialogButtonBox>
 #include <QTimer>
+#include <QDateTime>
 
 #include "qt4.hpp"
 #include "input_manager.hpp"
diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp
index d947d86..b7ebda3 100644
--- a/modules/gui/qt4/util/input_slider.cpp
+++ b/modules/gui/qt4/util/input_slider.cpp
@@ -30,6 +30,7 @@
 #include "qt4.hpp"
 
 #include "util/input_slider.hpp"
+#include "util/timetooltip.hpp"
 #include "adapters/seekpoints.hpp"
 
 #include <QPaintEvent>
diff --git a/modules/gui/qt4/util/input_slider.hpp b/modules/gui/qt4/util/input_slider.hpp
index 9fdfd42..4726109 100644
--- a/modules/gui/qt4/util/input_slider.hpp
+++ b/modules/gui/qt4/util/input_slider.hpp
@@ -30,7 +30,6 @@
 # include "config.h"
 #endif
 
-#include "timetooltip.hpp"
 #include "styles/seekstyle.hpp"
 
 #include <QSlider>
@@ -46,6 +45,7 @@ class QTimer;
 class SeekPoints;
 class QPropertyAnimation;
 class QCommonStyle;
+class TimeTooltip;
 
 /* Input Slider derived from QSlider */
 class SeekSlider : public QSlider



More information about the vlc-commits mailing list