summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2013-06-09 12:35:27 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2013-06-09 19:20:26 +0300
commit5f00d0b6a9380da88d941bcbafca65c30799c005 (patch)
tree09635897422651a042d815be61e03c2599acac69
parentfe58b57def11e36260ba0b8d6717b43b0fe91d3d (diff)
includes: Stop using <QtModule/QtClass> style includes outside of src/
* Makes Qt4/Qt5 compatible source code easier to read and develop since no Qt version checking is needed for deciding which module a certain class lives in. * Code under src/ (libraries) should use the old style because the QtGStreamer headers need to work even if only the top-level Qt include dir is in the compiler's include path (when building projects that use QtGStreamer)
-rw-r--r--elements/gstqtvideosink/abstractsurfacepainter.h2
-rw-r--r--elements/gstqtvideosink/autotest.cpp20
-rw-r--r--elements/gstqtvideosink/bufferformat.cpp2
-rw-r--r--elements/gstqtvideosink/bufferformat.h2
-rw-r--r--elements/gstqtvideosink/genericsurfacepainter.cpp2
-rw-r--r--elements/gstqtvideosink/genericsurfacepainter.h4
-rw-r--r--elements/gstqtvideosink/gstqtvideosinkbase.cpp2
-rw-r--r--elements/gstqtvideosink/gstqtvideosinkplugin.h2
-rw-r--r--elements/gstqtvideosink/openglsurfacepainter.h2
-rw-r--r--elements/gstqtvideosink/qtvideosinkdelegate.cpp6
-rw-r--r--elements/gstqtvideosink/qtvideosinkdelegate.h8
-rw-r--r--elements/gstqtvideosink/qwidgetvideosinkdelegate.cpp2
-rw-r--r--elements/gstqtvideosink/qwidgetvideosinkdelegate.h11
-rw-r--r--elements/gstqtvideosink/utils.h6
-rw-r--r--examples/appsink-src/main.cpp2
-rw-r--r--examples/player/main.cpp8
-rw-r--r--examples/player/mediaapp.cpp20
-rw-r--r--examples/player/mediaapp.h12
-rw-r--r--examples/player/player.cpp4
-rw-r--r--examples/player/player.h4
-rw-r--r--examples/qmlplayer/main.cpp14
-rw-r--r--examples/qmlplayer/player.cpp8
-rw-r--r--examples/qmlplayer/player.h2
-rw-r--r--examples/recorder/main.cpp17
-rw-r--r--examples/voip/main.cpp9
-rw-r--r--tests/manual/qwidgetvideosinktest.cpp9
-rw-r--r--tests/manual/videoorientationtest.cpp13
-rw-r--r--tests/manual/videowidgetpipelinetest.cpp7
-rw-r--r--tests/manual/videowidgettest.cpp13
29 files changed, 71 insertions, 142 deletions
diff --git a/elements/gstqtvideosink/abstractsurfacepainter.h b/elements/gstqtvideosink/abstractsurfacepainter.h
index e87e6cd..40cd1cb 100644
--- a/elements/gstqtvideosink/abstractsurfacepainter.h
+++ b/elements/gstqtvideosink/abstractsurfacepainter.h
@@ -18,7 +18,7 @@
#define ABSTRACTSURFACEPAINTER_H
#include "bufferformat.h"
-#include <QtCore/QRectF>
+#include <QRectF>
class QPainter;
diff --git a/elements/gstqtvideosink/autotest.cpp b/elements/gstqtvideosink/autotest.cpp
index 439601f..5495f89 100644
--- a/elements/gstqtvideosink/autotest.cpp
+++ b/elements/gstqtvideosink/autotest.cpp
@@ -18,29 +18,27 @@
#include <gst/gst.h>
#include <gst/video/video.h>
#include <gst/interfaces/colorbalance.h>
-#include <QtTest/QTest>
-#include <QtGui/QPainter>
-#include <QtCore/QDebug>
+
+#include <QTest>
+#include <QPainter>
+#include <QDebug>
+#include <QWidget>
+#include <QLabel>
+#include <QGridLayout>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QWidget>
-# include <QtWidgets/QLabel>
-# include <QtWidgets/QGridLayout>
# define SkipSingle 0
# define SkipAll 0
# define QSKIP_PORT(m, a) QSKIP(m)
#else
-# include <QtGui/QWidget>
-# include <QtGui/QLabel>
-# include <QtGui/QGridLayout>
# define QSKIP_PORT(m, a) QSKIP(m, a)
#endif
#ifndef GST_QT_VIDEO_SINK_NO_OPENGL
# include "openglsurfacepainter.h"
-# include <QtOpenGL/QGLWidget>
-# include <QtOpenGL/QGLPixelBuffer>
+# include <QGLWidget>
+# include <QGLPixelBuffer>
#endif
#include "genericsurfacepainter.h"
diff --git a/elements/gstqtvideosink/bufferformat.cpp b/elements/gstqtvideosink/bufferformat.cpp
index c6dd657..09b8a89 100644
--- a/elements/gstqtvideosink/bufferformat.cpp
+++ b/elements/gstqtvideosink/bufferformat.cpp
@@ -15,7 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bufferformat.h"
-#include <QtCore/QByteArray>
+#include <QByteArray>
BufferFormat BufferFormat::fromCaps(GstCaps *caps)
{
diff --git a/elements/gstqtvideosink/bufferformat.h b/elements/gstqtvideosink/bufferformat.h
index b47c80d..2534703 100644
--- a/elements/gstqtvideosink/bufferformat.h
+++ b/elements/gstqtvideosink/bufferformat.h
@@ -18,7 +18,7 @@
#define BUFFERFORMAT_H
#include "utils.h"
-#include <QtCore/QSharedData>
+#include <QSharedData>
#include <gst/video/video.h>
//0.11 stuff
diff --git a/elements/gstqtvideosink/genericsurfacepainter.cpp b/elements/gstqtvideosink/genericsurfacepainter.cpp
index 993f15c..864ea18 100644
--- a/elements/gstqtvideosink/genericsurfacepainter.cpp
+++ b/elements/gstqtvideosink/genericsurfacepainter.cpp
@@ -15,7 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "genericsurfacepainter.h"
-#include <QtGui/QPainter>
+#include <QPainter>
GenericSurfacePainter::GenericSurfacePainter()
: m_imageFormat(QImage::Format_Invalid)
diff --git a/elements/gstqtvideosink/genericsurfacepainter.h b/elements/gstqtvideosink/genericsurfacepainter.h
index ebe5998..66325df 100644
--- a/elements/gstqtvideosink/genericsurfacepainter.h
+++ b/elements/gstqtvideosink/genericsurfacepainter.h
@@ -18,8 +18,8 @@
#define GENERICSURFACEPAINTER_H
#include "abstractsurfacepainter.h"
-#include <QtCore/QSet>
-#include <QtGui/QImage>
+#include <QSet>
+#include <QImage>
/**
* Generic painter that paints using the QPainter API.
diff --git a/elements/gstqtvideosink/gstqtvideosinkbase.cpp b/elements/gstqtvideosink/gstqtvideosinkbase.cpp
index 0a6308a..138eed6 100644
--- a/elements/gstqtvideosink/gstqtvideosinkbase.cpp
+++ b/elements/gstqtvideosink/gstqtvideosinkbase.cpp
@@ -19,7 +19,7 @@
#include "qtvideosinkdelegate.h"
#include "genericsurfacepainter.h"
#include <cstring>
-#include <QtCore/QCoreApplication>
+#include <QCoreApplication>
GstVideoSinkClass *GstQtVideoSinkBase::s_parent_class = NULL;
diff --git a/elements/gstqtvideosink/gstqtvideosinkplugin.h b/elements/gstqtvideosink/gstqtvideosinkplugin.h
index 0f49037..2478bd5 100644
--- a/elements/gstqtvideosink/gstqtvideosinkplugin.h
+++ b/elements/gstqtvideosink/gstqtvideosinkplugin.h
@@ -18,7 +18,7 @@
#define GST_QT_VIDEO_SINK_PLUGIN_H
#include <gst/gst.h>
-#include <QtCore/QtGlobal>
+#include <QtGlobal>
GST_DEBUG_CATEGORY_EXTERN(gst_qt_video_sink_debug);
#define GST_CAT_DEFAULT gst_qt_video_sink_debug
diff --git a/elements/gstqtvideosink/openglsurfacepainter.h b/elements/gstqtvideosink/openglsurfacepainter.h
index babbe1f..c1e2dd0 100644
--- a/elements/gstqtvideosink/openglsurfacepainter.h
+++ b/elements/gstqtvideosink/openglsurfacepainter.h
@@ -20,7 +20,7 @@
#ifndef GST_QT_VIDEO_SINK_NO_OPENGL
#include "abstractsurfacepainter.h"
-#include <QtOpenGL/QGLShaderProgram>
+#include <QGLShaderProgram>
#ifndef Q_WS_MAC
# ifndef APIENTRYP
diff --git a/elements/gstqtvideosink/qtvideosinkdelegate.cpp b/elements/gstqtvideosink/qtvideosinkdelegate.cpp
index e9f9e81..24d581e 100644
--- a/elements/gstqtvideosink/qtvideosinkdelegate.cpp
+++ b/elements/gstqtvideosink/qtvideosinkdelegate.cpp
@@ -21,9 +21,9 @@
#include "gstqtvideosink.h"
#include "gstqtglvideosink.h"
-#include <QtCore/QCoreApplication>
-#include <QtCore/QStack>
-#include <QtGui/QPainter>
+#include <QCoreApplication>
+#include <QStack>
+#include <QPainter>
#define QSIZE_FORMAT "(%d x %d)"
#define QSIZE_FORMAT_ARGS(size) \
diff --git a/elements/gstqtvideosink/qtvideosinkdelegate.h b/elements/gstqtvideosink/qtvideosinkdelegate.h
index 3f9697c..5ae342f 100644
--- a/elements/gstqtvideosink/qtvideosinkdelegate.h
+++ b/elements/gstqtvideosink/qtvideosinkdelegate.h
@@ -22,10 +22,10 @@
#include "bufferformat.h"
#include "abstractsurfacepainter.h"
-#include <QtCore/QObject>
-#include <QtCore/QEvent>
-#include <QtCore/QSet>
-#include <QtCore/QReadWriteLock>
+#include <QObject>
+#include <QEvent>
+#include <QSet>
+#include <QReadWriteLock>
class QGLContext;
diff --git a/elements/gstqtvideosink/qwidgetvideosinkdelegate.cpp b/elements/gstqtvideosink/qwidgetvideosinkdelegate.cpp
index eeb3855..336bf76 100644
--- a/elements/gstqtvideosink/qwidgetvideosinkdelegate.cpp
+++ b/elements/gstqtvideosink/qwidgetvideosinkdelegate.cpp
@@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "qwidgetvideosinkdelegate.h"
-#include <QtGui/QPainter>
+#include <QPainter>
QWidgetVideoSinkDelegate::QWidgetVideoSinkDelegate(GstQtVideoSinkBase* sink, QObject* parent)
: QtVideoSinkDelegate(sink, parent)
diff --git a/elements/gstqtvideosink/qwidgetvideosinkdelegate.h b/elements/gstqtvideosink/qwidgetvideosinkdelegate.h
index d33e9f5..7e54395 100644
--- a/elements/gstqtvideosink/qwidgetvideosinkdelegate.h
+++ b/elements/gstqtvideosink/qwidgetvideosinkdelegate.h
@@ -19,14 +19,9 @@
#define QWIDGET_VIDEO_SINK_DELEGATE_H
#include "qtvideosinkdelegate.h"
-#include <QtCore/QEvent>
-#include <QtCore/QPointer>
-
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QWidget>
-#else
-# include <QtGui/QWidget>
-#endif
+#include <QEvent>
+#include <QPointer>
+#include <QWidget>
class QWidgetVideoSinkDelegate : public QtVideoSinkDelegate
{
diff --git a/elements/gstqtvideosink/utils.h b/elements/gstqtvideosink/utils.h
index ece1bd6..a2924a9 100644
--- a/elements/gstqtvideosink/utils.h
+++ b/elements/gstqtvideosink/utils.h
@@ -16,9 +16,9 @@
#ifndef UTILS_H
#define UTILS_H
-#include <QtCore/QRectF>
-#include <QtCore/QSize>
-#include <QtCore/QMetaType>
+#include <QRectF>
+#include <QSize>
+#include <QMetaType>
struct Fraction
{
diff --git a/examples/appsink-src/main.cpp b/examples/appsink-src/main.cpp
index 9476079..68230cf 100644
--- a/examples/appsink-src/main.cpp
+++ b/examples/appsink-src/main.cpp
@@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
-#include <QtCore/QCoreApplication>
+#include <QCoreApplication>
#include <QGlib/Error>
#include <QGlib/Connect>
#include <QGst/Init>
diff --git a/examples/player/main.cpp b/examples/player/main.cpp
index b02b0ba..f3ae8b5 100644
--- a/examples/player/main.cpp
+++ b/examples/player/main.cpp
@@ -15,13 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "mediaapp.h"
-
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QApplication>
-#else
-# include <QtGui/QApplication>
-#endif
-
+#include <QApplication>
#include <QGst/Init>
int main(int argc, char *argv[])
diff --git a/examples/player/mediaapp.cpp b/examples/player/mediaapp.cpp
index 0285bae..1f9ccf1 100644
--- a/examples/player/mediaapp.cpp
+++ b/examples/player/mediaapp.cpp
@@ -19,20 +19,12 @@
#include "mediaapp.h"
#include "player.h"
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QBoxLayout>
-# include <QtWidgets/QFileDialog>
-# include <QtWidgets/QToolButton>
-# include <QtWidgets/QLabel>
-# include <QtWidgets/QSlider>
-#else
-# include <QtGui/QBoxLayout>
-# include <QtGui/QFileDialog>
-# include <QtGui/QToolButton>
-# include <QtGui/QLabel>
-# include <QtGui/QSlider>
-# include <QtGui/QMouseEvent>
-#endif
+#include <QBoxLayout>
+#include <QFileDialog>
+#include <QToolButton>
+#include <QLabel>
+#include <QSlider>
+#include <QMouseEvent>
MediaApp::MediaApp(QWidget *parent)
: QWidget(parent)
diff --git a/examples/player/mediaapp.h b/examples/player/mediaapp.h
index ff25f8f..fae333b 100644
--- a/examples/player/mediaapp.h
+++ b/examples/player/mediaapp.h
@@ -19,15 +19,9 @@
#ifndef MEDIAAPP_H
#define MEDIAAPP_H
-#include <QtCore/QTimer>
-
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QWidget>
-# include <QtWidgets/QStyle>
-#else
-# include <QtGui/QWidget>
-# include <QtGui/QStyle>
-#endif
+#include <QTimer>
+#include <QWidget>
+#include <QStyle>
class Player;
class QBoxLayout;
diff --git a/examples/player/player.cpp b/examples/player/player.cpp
index bfcd091..c4b604c 100644
--- a/examples/player/player.cpp
+++ b/examples/player/player.cpp
@@ -17,8 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "player.h"
-#include <QtCore/QDir>
-#include <QtCore/QUrl>
+#include <QDir>
+#include <QUrl>
#include <QGlib/Connect>
#include <QGlib/Error>
#include <QGst/Pipeline>
diff --git a/examples/player/player.h b/examples/player/player.h
index 697887d..500dacc 100644
--- a/examples/player/player.h
+++ b/examples/player/player.h
@@ -19,8 +19,8 @@
#ifndef PLAYER_H
#define PLAYER_H
-#include <QtCore/QTimer>
-#include <QtCore/QTime>
+#include <QTimer>
+#include <QTime>
#include <QGst/Pipeline>
#include <QGst/Ui/VideoWidget>
diff --git a/examples/qmlplayer/main.cpp b/examples/qmlplayer/main.cpp
index 8baeb78..bd94c76 100644
--- a/examples/qmlplayer/main.cpp
+++ b/examples/qmlplayer/main.cpp
@@ -17,19 +17,15 @@
*/
#include "player.h"
#include <cstdlib>
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QApplication>
-#else
-# include <QtGui/QApplication>
-#endif
-#include <QtDeclarative/QDeclarativeView>
-#include <QtDeclarative/QDeclarativeContext>
-#include <QtDeclarative/QDeclarativeEngine>
+#include <QApplication>
+#include <QDeclarativeView>
+#include <QDeclarativeContext>
+#include <QDeclarativeEngine>
#include <QGst/Ui/GraphicsVideoSurface>
#include <QGst/Init>
#ifndef QMLPLAYER_NO_OPENGL
-# include <QtOpenGL/QGLWidget>
+# include <QGLWidget>
#endif
int main(int argc, char **argv)
diff --git a/examples/qmlplayer/player.cpp b/examples/qmlplayer/player.cpp
index 578a115..5ec4072 100644
--- a/examples/qmlplayer/player.cpp
+++ b/examples/qmlplayer/player.cpp
@@ -17,12 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "player.h"
-#include <QtCore/QUrl>
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QFileDialog>
-#else
-# include <QtGui/QFileDialog>
-#endif
+#include <QUrl>
+#include <QFileDialog>
#include <QGlib/Connect>
#include <QGlib/Error>
#include <QGst/ElementFactory>
diff --git a/examples/qmlplayer/player.h b/examples/qmlplayer/player.h
index 2448f2d..f527456 100644
--- a/examples/qmlplayer/player.h
+++ b/examples/qmlplayer/player.h
@@ -19,7 +19,7 @@
#ifndef PLAYER_H
#define PLAYER_H
-#include <QtCore/QObject>
+#include <QObject>
#include <QGst/Pipeline>
#include <QGst/Message>
diff --git a/examples/recorder/main.cpp b/examples/recorder/main.cpp
index 6f7859f..d9da503 100644
--- a/examples/recorder/main.cpp
+++ b/examples/recorder/main.cpp
@@ -17,17 +17,10 @@
*/
#include "ui_recorder.h"
-#include <QtCore/QDir>
-
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QApplication>
-# include <QtWidgets/QDialog>
-# include <QtWidgets/QMessageBox>
-#else
-# include <QtGui/QApplication>
-# include <QtGui/QDialog>
-# include <QtGui/QMessageBox>
-#endif
+#include <QDir>
+#include <QApplication>
+#include <QDialog>
+#include <QMessageBox>
#include <QGlib/Error>
#include <QGlib/Connect>
@@ -42,7 +35,7 @@
#include <QGst/Bus>
#ifdef Q_WS_X11
-# include <QtGui/QX11Info>
+# include <QX11Info>
#endif
diff --git a/examples/voip/main.cpp b/examples/voip/main.cpp
index ee8d56b..6ac9b19 100644
--- a/examples/voip/main.cpp
+++ b/examples/voip/main.cpp
@@ -49,13 +49,8 @@
#include "ui_voip.h"
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QApplication>
-# include <QtWidgets/QDialog>
-#else
-# include <QtGui/QApplication>
-# include <QtGui/QDialog>
-#endif
+#include <QApplication>
+#include <QDialog>
#include <QGlib/Connect>
#include <QGlib/Error>
diff --git a/tests/manual/qwidgetvideosinktest.cpp b/tests/manual/qwidgetvideosinktest.cpp
index b6b11bf..c43a488 100644
--- a/tests/manual/qwidgetvideosinktest.cpp
+++ b/tests/manual/qwidgetvideosinktest.cpp
@@ -18,13 +18,8 @@
#include <QGst/Init>
#include <QGst/Pipeline>
#include <QGst/ElementFactory>
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QWidget>
-#else
-#include <QtGui/QApplication>
-#include <QtGui/QWidget>
-#endif
+#include <QApplication>
+#include <QWidget>
class QWidgetVideoSinkTest : public QWidget
diff --git a/tests/manual/videoorientationtest.cpp b/tests/manual/videoorientationtest.cpp
index 5658171..083ea27 100644
--- a/tests/manual/videoorientationtest.cpp
+++ b/tests/manual/videoorientationtest.cpp
@@ -20,16 +20,9 @@
#include <QGst/Pipeline>
#include <QGst/ElementFactory>
#include <QGst/VideoOrientation>
-
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QApplication>
-# include <QtWidgets/QMessageBox>
-# include <QtWidgets/QCheckBox>
-#else
-# include <QtGui/QApplication>
-# include <QtGui/QMessageBox>
-# include <QtGui/QCheckBox>
-#endif
+#include <QApplication>
+#include <QMessageBox>
+#include <QCheckBox>
class VideoOrientationTest : public QWidget
{
diff --git a/tests/manual/videowidgetpipelinetest.cpp b/tests/manual/videowidgetpipelinetest.cpp
index b3a19b0..81fe86a 100644
--- a/tests/manual/videowidgetpipelinetest.cpp
+++ b/tests/manual/videowidgetpipelinetest.cpp
@@ -19,12 +19,7 @@
#include <QGst/Init>
#include <QGst/Pipeline>
#include <QGst/ElementFactory>
-
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QApplication>
-#else
-# include <QtGui/QApplication>
-#endif
+#include <QApplication>
class VideoWidgetPipelineTest : public QWidget
{
diff --git a/tests/manual/videowidgettest.cpp b/tests/manual/videowidgettest.cpp
index 0865b19..a269dc4 100644
--- a/tests/manual/videowidgettest.cpp
+++ b/tests/manual/videowidgettest.cpp
@@ -18,16 +18,9 @@
#include <QGst/Init>
#include <QGst/Pipeline>
#include <QGst/ElementFactory>
-
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
-# include <QtWidgets/QApplication>
-# include <QtWidgets/QMessageBox>
-# include <QtWidgets/QButtonGroup>
-#else
-# include <QtGui/QApplication>
-# include <QtGui/QMessageBox>
-# include <QtGui/QButtonGroup>
-#endif
+#include <QApplication>
+#include <QMessageBox>
+#include <QButtonGroup>
class VideoWidgetTest : public QWidget
{