diff options
author | Giulio Camuffo <giuliocamuffo@gmail.com> | 2014-06-16 10:37:37 +0300 |
---|---|---|
committer | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2014-06-16 14:04:02 +0200 |
commit | aa16e0f762e2c5e5a6321e5ce8e9014ecb19be7d (patch) | |
tree | e0b76688e2fe3d6f25f3e083b3c69b4d2a6a357f | |
parent | b564681db53593fbbb97ed1dfbe165d66cde6bdc (diff) |
Reduce headers inter-dependency in the QPA plugin
Change-Id: I8b810e54531453b6a80250555c21bb0b1e6e76cc
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
24 files changed, 74 insertions, 34 deletions
diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp index f5056f6d0..8f690aae0 100644 --- a/src/client/qwaylanddatadevice.cpp +++ b/src/client/qwaylanddatadevice.cpp @@ -45,6 +45,7 @@ #include "qwaylanddatasource_p.h" #include "qwaylanddnd_p.h" #include "qwaylandinputdevice_p.h" +#include "qwaylanddisplay_p.h" #include <QtCore/QMimeData> #include <QtGui/QGuiApplication> diff --git a/src/client/qwaylanddatadevice_p.h b/src/client/qwaylanddatadevice_p.h index 4e98424e5..f5fad1772 100644 --- a/src/client/qwaylanddatadevice_p.h +++ b/src/client/qwaylanddatadevice_p.h @@ -41,15 +41,21 @@ #ifndef QWAYLANDDATADEVICE_H #define QWAYLANDDATADEVICE_H -#include "qwaylanddisplay_p.h" +#include <QObject> +#include <QPoint> + +#include <QtWaylandClient/private/qwayland-wayland.h> QT_BEGIN_NAMESPACE +class QWaylandDisplay; class QMimeData; class QWaylandDataDeviceManager; class QWaylandDataOffer; class QWaylandDataSource; class QWindow; +class QWaylandInputDevice; +class QWaylandWindow; class QWaylandDataDevice : public QObject, public QtWayland::wl_data_device { diff --git a/src/client/qwaylanddatadevicemanager.cpp b/src/client/qwaylanddatadevicemanager.cpp index 5de28c001..1aef77349 100644 --- a/src/client/qwaylanddatadevicemanager.cpp +++ b/src/client/qwaylanddatadevicemanager.cpp @@ -44,6 +44,7 @@ #include "qwaylandinputdevice_p.h" #include "qwaylanddatadevice_p.h" #include "qwaylanddataoffer_p.h" +#include "qwaylanddisplay_p.h" #include <QtCore/QDebug> diff --git a/src/client/qwaylanddatadevicemanager_p.h b/src/client/qwaylanddatadevicemanager_p.h index 6e2beafbe..55583c61b 100644 --- a/src/client/qwaylanddatadevicemanager_p.h +++ b/src/client/qwaylanddatadevicemanager_p.h @@ -42,12 +42,15 @@ #ifndef QWAYLANDDATADEVICEMANAGER_H #define QWAYLANDDATADEVICEMANAGER_H -#include <QtWaylandClient/private/qwaylanddisplay_p.h> +#include <QtWaylandClient/private/qwaylandclientexport_p.h> +#include <QtWaylandClient/private/qwayland-wayland.h> QT_BEGIN_NAMESPACE +class QWaylandDisplay; class QWaylandDataDevice; class QWaylandDataSource; +class QWaylandInputDevice; class Q_WAYLAND_CLIENT_EXPORT QWaylandDataDeviceManager : public QtWayland::wl_data_device_manager { diff --git a/src/client/qwaylanddataoffer.cpp b/src/client/qwaylanddataoffer.cpp index f72330928..d1c85c7a4 100644 --- a/src/client/qwaylanddataoffer.cpp +++ b/src/client/qwaylanddataoffer.cpp @@ -41,6 +41,7 @@ #include "qwaylanddataoffer_p.h" #include "qwaylanddatadevicemanager_p.h" +#include "qwaylanddisplay_p.h" #include <QtCore/private/qcore_unix_p.h> #include <QtGui/private/qguiapplication_p.h> diff --git a/src/client/qwaylanddataoffer_p.h b/src/client/qwaylanddataoffer_p.h index 9f5b6cf1e..a21e18bdc 100644 --- a/src/client/qwaylanddataoffer_p.h +++ b/src/client/qwaylanddataoffer_p.h @@ -42,10 +42,11 @@ #ifndef QWAYLANDDATAOFFER_H #define QWAYLANDDATAOFFER_H -#include "qwaylanddisplay_p.h" - #include <QtGui/private/qdnd_p.h> +#include <QtWaylandClient/private/qwaylandclientexport_p.h> +#include <QtWaylandClient/private/qwayland-wayland.h> + QT_BEGIN_NAMESPACE class QWaylandDisplay; diff --git a/src/client/qwaylanddatasource_p.h b/src/client/qwaylanddatasource_p.h index 9568f507c..a721336f7 100644 --- a/src/client/qwaylanddatasource_p.h +++ b/src/client/qwaylanddatasource_p.h @@ -42,14 +42,16 @@ #ifndef QWAYLANDDATASOURCE_H #define QWAYLANDDATASOURCE_H -#include <QtWaylandClient/private/qwaylanddatadevicemanager_p.h> +#include <QObject> -#include <QtWaylandClient/private/wayland-wayland-client-protocol.h> +#include <QtWaylandClient/private/qwayland-wayland.h> +#include <QtWaylandClient/private/qwaylandclientexport_p.h> QT_BEGIN_NAMESPACE class QMimeData; class QWaylandDataDeviceManager; +class QWaylandDisplay; class Q_WAYLAND_CLIENT_EXPORT QWaylandDataSource : public QObject, public QtWayland::wl_data_source { diff --git a/src/client/qwaylanddnd.cpp b/src/client/qwaylanddnd.cpp index 0d5eddf5b..996e647cc 100644 --- a/src/client/qwaylanddnd.cpp +++ b/src/client/qwaylanddnd.cpp @@ -45,6 +45,7 @@ #include "qwaylanddatadevicemanager_p.h" #include "qwaylanddataoffer_p.h" #include "qwaylandinputdevice_p.h" +#include "qwaylanddisplay_p.h" #include <QtGui/private/qshapedpixmapdndwindow_p.h> diff --git a/src/client/qwaylanddnd_p.h b/src/client/qwaylanddnd_p.h index 22b004712..1d236fad5 100644 --- a/src/client/qwaylanddnd_p.h +++ b/src/client/qwaylanddnd_p.h @@ -47,10 +47,13 @@ #include <QtGui/QDrag> #include <QtCore/QMimeData> -#include <QtWaylandClient/private/qwaylanddisplay_p.h> + +#include <QtWaylandClient/private/qwaylandclientexport_p.h> QT_BEGIN_NAMESPACE +class QWaylandDisplay; + class Q_WAYLAND_CLIENT_EXPORT QWaylandDrag : public QBasicDrag { public: diff --git a/src/client/qwaylandextendedoutput_p.h b/src/client/qwaylandextendedoutput_p.h index f18fb8e57..4295412ec 100644 --- a/src/client/qwaylandextendedoutput_p.h +++ b/src/client/qwaylandextendedoutput_p.h @@ -42,11 +42,13 @@ #ifndef QWAYLANDEXTENDEDOUTPUT_H #define QWAYLANDEXTENDEDOUTPUT_H -#include <QtWaylandClient/private/qwaylanddisplay_p.h> #include <QtWaylandClient/private/qwayland-output-extension.h> +#include <QtWaylandClient/private/qwaylandclientexport_p.h> QT_BEGIN_NAMESPACE +class QWaylandDisplay; +class QWaylandScreen; class QWaylandExtendedOutput; class Q_WAYLAND_CLIENT_EXPORT QWaylandExtendedOutput : public QtWayland::qt_extended_output diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index cce2d9790..9c570c7c8 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -49,6 +49,7 @@ #include "qwaylandtouch_p.h" #include "qwaylandscreen_p.h" #include "qwaylandcursor_p.h" +#include "qwaylanddisplay_p.h" #include <QtGui/private/qpixmap_raster_p.h> #include <qpa/qplatformwindow.h> diff --git a/src/client/qwaylandnativeinterface.cpp b/src/client/qwaylandnativeinterface.cpp index f8d95bb25..e3d6fef4a 100644 --- a/src/client/qwaylandnativeinterface.cpp +++ b/src/client/qwaylandnativeinterface.cpp @@ -46,6 +46,7 @@ #include "qwaylandintegration_p.h" #include "qwaylanddisplay_p.h" #include "qwaylandwindowmanagerintegration_p.h" +#include "qwaylandscreen_p.h" #include <QtGui/private/qguiapplication_p.h> #include <QtGui/QScreen> diff --git a/src/client/qwaylandnativeinterface_p.h b/src/client/qwaylandnativeinterface_p.h index b9ee2d0e8..536cbe8dd 100644 --- a/src/client/qwaylandnativeinterface_p.h +++ b/src/client/qwaylandnativeinterface_p.h @@ -42,13 +42,15 @@ #ifndef QWAYLANDNATIVEINTERFACE_H #define QWAYLANDNATIVEINTERFACE_H -#include <QtWaylandClient/private/qwaylandscreen_p.h> #include <QVariantMap> #include <qpa/qplatformnativeinterface.h> +#include <QtWaylandClient/private/qwaylandclientexport_p.h> + QT_BEGIN_NAMESPACE class QWaylandIntegration; +class QWaylandScreen; class Q_WAYLAND_CLIENT_EXPORT QWaylandNativeInterface : public QPlatformNativeInterface { diff --git a/src/client/qwaylandqtkey.cpp b/src/client/qwaylandqtkey.cpp index 263390a1f..197914b0b 100644 --- a/src/client/qwaylandqtkey.cpp +++ b/src/client/qwaylandqtkey.cpp @@ -41,6 +41,7 @@ #include "qwaylandqtkey_p.h" #include "qwaylandinputdevice_p.h" +#include "qwaylanddisplay_p.h" QT_BEGIN_NAMESPACE diff --git a/src/client/qwaylandqtkey_p.h b/src/client/qwaylandqtkey_p.h index a9c4e99fa..d00a90ee0 100644 --- a/src/client/qwaylandqtkey_p.h +++ b/src/client/qwaylandqtkey_p.h @@ -42,13 +42,15 @@ #ifndef QWAYLANDQTKEY_H #define QWAYLANDQTKEY_H -#include <QtWaylandClient/private/qwaylanddisplay_p.h> #include <qpa/qwindowsysteminterface.h> +#include <QtWaylandClient/private/qwaylandclientexport_p.h> #include <QtWaylandClient/private/qwayland-qtkey-extension.h> QT_BEGIN_NAMESPACE +class QWaylandDisplay; + class Q_WAYLAND_CLIENT_EXPORT QWaylandQtKeyExtension : public QtWayland::qt_key_extension { public: diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp index 41f7da200..0677ed0d3 100644 --- a/src/client/qwaylandshmbackingstore.cpp +++ b/src/client/qwaylandshmbackingstore.cpp @@ -290,6 +290,24 @@ void QWaylandShmBackingStore::updateDecorations() decorationPainter.drawImage(target, sourceImage, target); } +QWaylandDecoration *QWaylandShmBackingStore::windowDecoration() const +{ + return waylandWindow()->decoration(); +} + +QMargins QWaylandShmBackingStore::windowDecorationMargins() const +{ + if (windowDecoration()) + return windowDecoration()->margins(); + return QMargins(); +} + +QWaylandShmWindow *QWaylandShmBackingStore::waylandWindow() const +{ + return static_cast<QWaylandShmWindow *>(window()->handle()); +} + + void QWaylandShmBackingStore::done(void *data, wl_callback *callback, uint32_t time) { Q_UNUSED(time); diff --git a/src/client/qwaylandshmbackingstore_p.h b/src/client/qwaylandshmbackingstore_p.h index 1affafabc..6097b5282 100644 --- a/src/client/qwaylandshmbackingstore_p.h +++ b/src/client/qwaylandshmbackingstore_p.h @@ -44,9 +44,6 @@ #include <QtWaylandClient/private/qwaylandbuffer_p.h> -#include <QtWaylandClient/private/qwaylanddecoration_p.h> -#include <QtWaylandClient/private/qwaylandshmwindow_p.h> - #include <qpa/qplatformbackingstore.h> #include <QtGui/QImage> #include <qpa/qplatformwindow.h> @@ -54,6 +51,8 @@ QT_BEGIN_NAMESPACE class QWaylandDisplay; +class QWaylandDecoration; +class QWaylandShmWindow; class Q_WAYLAND_CLIENT_EXPORT QWaylandShmBuffer : public QWaylandBuffer { public: @@ -112,23 +111,6 @@ private: struct wl_callback *mFrameCallback; }; -inline QWaylandDecoration *QWaylandShmBackingStore::windowDecoration() const -{ - return waylandWindow()->decoration(); -} - -inline QMargins QWaylandShmBackingStore::windowDecorationMargins() const -{ - if (windowDecoration()) - return windowDecoration()->margins(); - return QMargins(); -} - -inline QWaylandShmWindow *QWaylandShmBackingStore::waylandWindow() const -{ - return static_cast<QWaylandShmWindow *>(window()->handle()); -} - QT_END_NAMESPACE #endif diff --git a/src/client/qwaylandtouch.cpp b/src/client/qwaylandtouch.cpp index 01a199260..71cc1c3cc 100644 --- a/src/client/qwaylandtouch.cpp +++ b/src/client/qwaylandtouch.cpp @@ -41,6 +41,7 @@ #include "qwaylandtouch_p.h" #include "qwaylandinputdevice_p.h" +#include "qwaylanddisplay_p.h" QT_BEGIN_NAMESPACE diff --git a/src/client/qwaylandtouch_p.h b/src/client/qwaylandtouch_p.h index bd299a1af..20827fa8f 100644 --- a/src/client/qwaylandtouch_p.h +++ b/src/client/qwaylandtouch_p.h @@ -42,13 +42,16 @@ #ifndef QWAYLANDTOUCH_H #define QWAYLANDTOUCH_H -#include <QtWaylandClient/private/qwaylanddisplay_p.h> #include <qpa/qwindowsysteminterface.h> #include <QtWaylandClient/private/qwayland-touch-extension.h> +#include <QtWaylandClient/private/qwaylandclientexport_p.h> QT_BEGIN_NAMESPACE +class QWaylandDisplay; +class QWaylandInputDevice; + class Q_WAYLAND_CLIENT_EXPORT QWaylandTouchExtension : public QtWayland::qt_touch_extension { public: diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index ce89e3d6b..dbf76d11f 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -48,9 +48,8 @@ #include <qpa/qplatformwindow.h> -#include <QtWaylandClient/private/qwaylanddisplay_p.h> - #include <QtWaylandClient/private/qwayland-wayland.h> +#include <QtWaylandClient/private/qwaylandclientexport_p.h> struct wl_egl_window; @@ -62,6 +61,8 @@ class QWaylandShellSurface; class QWaylandExtendedSurface; class QWaylandSubSurface; class QWaylandDecoration; +class QWaylandInputDevice; +class QWaylandScreen; class Q_WAYLAND_CLIENT_EXPORT QWaylandWindowConfigure { diff --git a/src/client/qwaylandwindowmanagerintegration.cpp b/src/client/qwaylandwindowmanagerintegration.cpp index 9e8ce88c6..c2e0153a5 100644 --- a/src/client/qwaylandwindowmanagerintegration.cpp +++ b/src/client/qwaylandwindowmanagerintegration.cpp @@ -42,6 +42,7 @@ #include "qwaylandwindowmanagerintegration_p.h" #include "qwaylandscreen_p.h" #include "qwaylandwindow_p.h" +#include "qwaylanddisplay_p.h" #include <stdint.h> #include <QtCore/QEvent> diff --git a/src/client/qwaylandwindowmanagerintegration_p.h b/src/client/qwaylandwindowmanagerintegration_p.h index 844b122a0..0ad2e38df 100644 --- a/src/client/qwaylandwindowmanagerintegration_p.h +++ b/src/client/qwaylandwindowmanagerintegration_p.h @@ -46,14 +46,16 @@ #include <QtCore/QScopedPointer> #include <wayland-client.h> -#include <QtWaylandClient/private/qwaylanddisplay_p.h> #include <qpa/qplatformservices.h> #include <QtWaylandClient/private/qwayland-windowmanager.h> +#include <QtWaylandClient/private/qwaylandclientexport_p.h> QT_BEGIN_NAMESPACE class QWaylandWindow; +class QWaylandDisplay; + class QWaylandWindowManagerIntegrationPrivate; class Q_WAYLAND_CLIENT_EXPORT QWaylandWindowManagerIntegration : public QObject, public QPlatformServices, public QtWayland::qt_windowmanager diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp index 77c4d4a02..fbb715df1 100644 --- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp +++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp @@ -46,6 +46,8 @@ #include <QtCore/QDebug> #include <QtPlatformSupport/private/qeglconvenience_p.h> +#include <QtWaylandClient/private/qwaylanddisplay_p.h> + #include "wayland-xcomposite-client-protocol.h" QT_BEGIN_NAMESPACE diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp index f08f8dcb5..61edd0531 100644 --- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp +++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp @@ -47,6 +47,8 @@ #include "wayland-xcomposite-client-protocol.h" +#include <QtWaylandClient/private/qwaylanddisplay_p.h> + QT_BEGIN_NAMESPACE QWaylandXCompositeGLXIntegration::QWaylandXCompositeGLXIntegration() |