From 0dc189a432779d5840a8e1847a24b898daf6f3c5 Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Thu, 29 Jan 2015 14:35:44 +0200 Subject: [PATCH] Namespace the platform plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There currently is a QWaylandInputDevice class both in the wayland QPA plugin and in the QtCompositor API. This causes the qwindow-compositor example to crash when running nested in a wayland session due to a mismatch between the two classes. By namespacing all the plugin code we make sure that name clashes will not happen anymore. Change-Id: I17497cff697599200bea68bf01dfde474526390f Reviewed-by: Jørgen Lind --- .../qwaylandclientbufferintegration.cpp | 4 +++ .../qwaylandclientbufferintegration_p.h | 10 ++++--- ...qwaylandclientbufferintegrationfactory.cpp | 4 +++ ...qwaylandclientbufferintegrationfactory_p.h | 4 +++ .../qwaylandclientbufferintegrationplugin.cpp | 4 +++ .../qwaylandclientbufferintegrationplugin_p.h | 4 +++ .../qwaylandhardwareintegration.cpp | 4 +++ .../qwaylandhardwareintegration_p.h | 4 +++ .../qwaylandserverbufferintegration.cpp | 4 +++ .../qwaylandserverbufferintegration_p.h | 4 +++ ...qwaylandserverbufferintegrationfactory.cpp | 4 +++ ...qwaylandserverbufferintegrationfactory_p.h | 4 +++ .../qwaylandserverbufferintegrationplugin.cpp | 4 +++ .../qwaylandserverbufferintegrationplugin_p.h | 4 +++ .../qwaylandinputdeviceintegration_p.h | 4 +++ .../qwaylandinputdeviceintegrationfactory.cpp | 4 +++ .../qwaylandinputdeviceintegrationfactory_p.h | 4 +++ .../qwaylandinputdeviceintegrationplugin.cpp | 4 +++ .../qwaylandinputdeviceintegrationplugin_p.h | 4 +++ .../plugins/decorations/bradient/main.cpp | 3 +++ .../hardwareintegration/brcm-egl/main.cpp | 4 +++ .../drm-egl-server/main.cpp | 4 +++ .../libhybris-egl-server/main.cpp | 4 +++ .../hardwareintegration/wayland-egl/main.cpp | 4 +++ .../xcomposite-egl/main.cpp | 4 +++ .../xcomposite-glx/main.cpp | 4 +++ .../wayland/qwaylandabstractdecoration.cpp | 4 +++ .../wayland/qwaylandabstractdecoration_p.h | 5 ++++ .../platforms/wayland/qwaylandbuffer_p.h | 4 +++ .../platforms/wayland/qwaylandclipboard.cpp | 4 +++ .../platforms/wayland/qwaylandclipboard_p.h | 4 +++ .../platforms/wayland/qwaylandcursor.cpp | 4 +++ .../platforms/wayland/qwaylandcursor_p.h | 4 +++ .../platforms/wayland/qwaylanddatadevice.cpp | 8 ++++++ .../platforms/wayland/qwaylanddatadevice_p.h | 9 +++++-- .../wayland/qwaylanddatadevicemanager.cpp | 3 +++ .../wayland/qwaylanddatadevicemanager_p.h | 4 +++ .../platforms/wayland/qwaylanddataoffer.cpp | 4 +++ .../platforms/wayland/qwaylanddataoffer_p.h | 4 +++ .../platforms/wayland/qwaylanddatasource.cpp | 4 +++ .../platforms/wayland/qwaylanddatasource_p.h | 5 ++++ .../wayland/qwaylanddecorationfactory.cpp | 4 +++ .../wayland/qwaylanddecorationfactory_p.h | 4 +++ .../wayland/qwaylanddecorationplugin.cpp | 4 +++ .../wayland/qwaylanddecorationplugin_p.h | 4 +++ .../platforms/wayland/qwaylanddisplay.cpp | 4 +++ .../platforms/wayland/qwaylanddisplay_p.h | 27 +++++++++++-------- src/plugins/platforms/wayland/qwaylanddnd.cpp | 4 +++ src/plugins/platforms/wayland/qwaylanddnd_p.h | 4 +++ .../platforms/wayland/qwaylandeventthread.cpp | 4 +++ .../platforms/wayland/qwaylandeventthread_p.h | 4 +++ .../wayland/qwaylandextendedoutput.cpp | 3 +++ .../wayland/qwaylandextendedoutput_p.h | 4 +++ .../wayland/qwaylandextendedsurface.cpp | 4 +++ .../wayland/qwaylandextendedsurface_p.h | 4 +++ .../wayland/qwaylandinputcontext.cpp | 4 +++ .../wayland/qwaylandinputcontext_p.h | 4 +++ .../platforms/wayland/qwaylandinputdevice.cpp | 4 +++ .../platforms/wayland/qwaylandinputdevice_p.h | 3 +++ .../platforms/wayland/qwaylandintegration.cpp | 4 +++ .../platforms/wayland/qwaylandintegration_p.h | 4 +++ .../wayland/qwaylandnativeinterface.cpp | 4 +++ .../wayland/qwaylandnativeinterface_p.h | 4 +++ .../platforms/wayland/qwaylandqtkey.cpp | 4 +++ .../platforms/wayland/qwaylandqtkey_p.h | 4 +++ .../platforms/wayland/qwaylandscreen.cpp | 4 +++ .../platforms/wayland/qwaylandscreen_p.h | 4 +++ .../wayland/qwaylandshellsurface.cpp | 8 ++++++ .../wayland/qwaylandshellsurface_p.h | 7 ++++- .../wayland/qwaylandshmbackingstore.cpp | 4 +++ .../wayland/qwaylandshmbackingstore_p.h | 4 +++ .../platforms/wayland/qwaylandshmwindow.cpp | 4 +++ .../platforms/wayland/qwaylandshmwindow_p.h | 4 +++ .../platforms/wayland/qwaylandsubsurface.cpp | 4 +++ .../platforms/wayland/qwaylandsubsurface_p.h | 4 +++ .../platforms/wayland/qwaylandtouch.cpp | 4 +++ .../platforms/wayland/qwaylandtouch_p.h | 4 +++ .../platforms/wayland/qwaylandwindow.cpp | 4 +++ .../platforms/wayland/qwaylandwindow_p.h | 4 +++ .../qwaylandwindowmanagerintegration.cpp | 4 +++ .../qwaylandwindowmanagerintegration_p.h | 4 +++ .../wayland/qwaylandwlshellsurface.cpp | 4 +++ .../wayland/qwaylandwlshellsurface_p.h | 7 ++++- .../platforms/wayland/qwaylandxdgshell.cpp | 3 +++ .../platforms/wayland/qwaylandxdgshell_p.h | 7 ++++- .../platforms/wayland/qwaylandxdgsurface.cpp | 4 +++ .../platforms/wayland/qwaylandxdgsurface_p.h | 7 ++++- .../qwaylandshellintegration_p.h | 4 +++ .../qwaylandshellintegrationfactory.cpp | 4 +++ .../qwaylandshellintegrationfactory_p.h | 4 +++ .../qwaylandshellintegrationplugin.cpp | 4 +++ .../qwaylandshellintegrationplugin_p.h | 4 +++ 92 files changed, 399 insertions(+), 20 deletions(-) diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration.cpp b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration.cpp index 2c4d8ff1bf6..f6099309782 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration.cpp +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration.cpp @@ -43,6 +43,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandClientBufferIntegration::QWaylandClientBufferIntegration() { @@ -53,4 +55,6 @@ QWaylandClientBufferIntegration::~QWaylandClientBufferIntegration() } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h index 898ab225157..8c787175dba 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegration_p.h @@ -47,13 +47,15 @@ QT_BEGIN_NAMESPACE -class QWaylandWindow; -class QWaylandDisplay; class QWindow; - class QPlatformOpenGLContext; class QSurfaceFormat; +namespace QtWaylandClient { + +class QWaylandWindow; +class QWaylandDisplay; + class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegration { public: @@ -79,6 +81,8 @@ public: virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return Q_NULLPTR; } }; +} + QT_END_NAMESPACE #endif // QWAYLANDCLIENTBUFFERINTEGRATION_H diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp index 7f2648bcf99..d0603ef2288 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp @@ -48,6 +48,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + #ifndef QT_NO_LIBRARY Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-client"), Qt::CaseInsensitive)) @@ -93,4 +95,6 @@ QWaylandClientBufferIntegration *QWaylandClientBufferIntegrationFactory::create( return 0; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h index 4a1c4128694..25ea5805e7b 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandClientBufferIntegration; class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegrationFactory @@ -56,6 +58,8 @@ public: static QWaylandClientBufferIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString()); }; +} + QT_END_NAMESPACE #endif // QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp index afc1051067d..1b362b29436 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp @@ -43,6 +43,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandClientBufferIntegrationPlugin::QWaylandClientBufferIntegrationPlugin(QObject *parent) : QObject(parent) { @@ -52,4 +54,6 @@ QWaylandClientBufferIntegrationPlugin::~QWaylandClientBufferIntegrationPlugin() { } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h index 7f96ebc6a0b..a14c17810d5 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandClientBufferIntegration; #define QWaylandClientBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3" @@ -64,6 +66,8 @@ public: virtual QWaylandClientBufferIntegration *create(const QString &key, const QStringList ¶mList) = 0; }; +} + QT_END_NAMESPACE #endif // QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration.cpp b/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration.cpp index 469f80360f3..c02eebf3a2a 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration.cpp +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration.cpp @@ -44,6 +44,8 @@ #include "qwaylanddisplay_p.h" QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandHardwareIntegration::QWaylandHardwareIntegration(struct ::wl_registry *registry, int id) : qt_hardware_integration(registry, id, 1) { @@ -69,4 +71,6 @@ void QWaylandHardwareIntegration::hardware_integration_server_backend(const QStr m_server_buffer = name; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration_p.h b/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration_p.h index 84aa18ace70..503e69b033f 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration_p.h +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandhardwareintegration_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class Q_WAYLAND_CLIENT_EXPORT QWaylandHardwareIntegration : public QtWayland::qt_hardware_integration @@ -66,6 +68,8 @@ private: QString m_server_buffer; }; +} + QT_END_NAMESPACE #endif diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegration.cpp b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegration.cpp index 5bac689293a..07780f52ebb 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegration.cpp +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegration.cpp @@ -43,6 +43,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandServerBuffer::QWaylandServerBuffer() : m_user_data(0) { @@ -79,4 +81,6 @@ QWaylandServerBufferIntegration::~QWaylandServerBufferIntegration() { } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegration_p.h b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegration_p.h index 18090a79831..7732cea2744 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegration_p.h +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegration_p.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBuffer @@ -90,6 +92,8 @@ public: virtual QWaylandServerBuffer *serverBuffer(struct qt_server_buffer *buffer) = 0; }; +} + QT_END_NAMESPACE #endif diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp index 2b61dbdc888..3df77a003bd 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp @@ -48,6 +48,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + #ifndef QT_NO_LIBRARY Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-client"), Qt::CaseInsensitive)) @@ -93,4 +95,6 @@ QWaylandServerBufferIntegration *QWaylandServerBufferIntegrationFactory::create( return 0; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h index 48e5e13d9ba..5fcce2ba6ab 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandServerBufferIntegration; class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBufferIntegrationFactory @@ -56,6 +58,8 @@ public: static QWaylandServerBufferIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString()); }; +} + QT_END_NAMESPACE #endif // QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp index 8fc31a883d6..e77bec0e762 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp @@ -43,6 +43,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandServerBufferIntegrationPlugin::QWaylandServerBufferIntegrationPlugin(QObject *parent) : QObject(parent) { @@ -51,4 +53,6 @@ QWaylandServerBufferIntegrationPlugin::~QWaylandServerBufferIntegrationPlugin() { } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h index d5d1d78f530..f74ee1ad131 100644 --- a/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h +++ b/src/plugins/platforms/wayland/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandServerBufferIntegration; #define QWaylandServerBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandServerBufferIntegrationFactoryInterface.5.3" @@ -64,6 +66,8 @@ public: virtual QWaylandServerBufferIntegration *create(const QString &key, const QStringList ¶mList) = 0; }; +} + QT_END_NAMESPACE #endif // QWAYLANDSERVERBUFFERINTEGRATIONPLUGIN_H diff --git a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegration_p.h b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegration_p.h index 5fa187e6997..54ead23c454 100644 --- a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegration_p.h +++ b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegration_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandInputDevice; @@ -59,6 +61,8 @@ public: virtual QWaylandInputDevice *createInputDevice(QWaylandDisplay *d, int version, uint32_t id) = 0; }; +} + QT_END_NAMESPACE #endif // QWAYLANDINPUTDEVICEINTEGRATION_H diff --git a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp index 58a82fb2c3a..f9e459ed9cc 100644 --- a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp +++ b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp @@ -48,6 +48,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + #ifndef QT_NO_LIBRARY Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QWaylandInputDeviceIntegrationFactoryInterface_iid, QLatin1String("/wayland-inputdevice-integration"), Qt::CaseInsensitive)) @@ -93,4 +95,6 @@ QWaylandInputDeviceIntegration *QWaylandInputDeviceIntegrationFactory::create(co return Q_NULLPTR; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h index 13cddc24f04..74cfba8c878 100644 --- a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h +++ b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandInputDeviceIntegration; class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDeviceIntegrationFactory @@ -56,6 +58,8 @@ public: static QWaylandInputDeviceIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString()); }; +} + QT_END_NAMESPACE #endif // QWAYLANDINPUTDEVICENTEGRATIONFACTORY_H diff --git a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp index 71a9332540d..c78a095966b 100644 --- a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp +++ b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp @@ -43,6 +43,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandInputDeviceIntegrationPlugin::QWaylandInputDeviceIntegrationPlugin(QObject *parent) : QObject(parent) { @@ -52,4 +54,6 @@ QWaylandInputDeviceIntegrationPlugin::~QWaylandInputDeviceIntegrationPlugin() { } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h index a0a062f4c3e..9723191d80b 100644 --- a/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h +++ b/src/plugins/platforms/wayland/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandInputDeviceIntegration; #define QWaylandInputDeviceIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandInputDeviceIntegrationFactoryInterface.5.3" @@ -64,6 +66,8 @@ public: virtual QWaylandInputDeviceIntegration *create(const QString &key, const QStringList ¶mList) = 0; }; +} + QT_END_NAMESPACE #endif // QWAYLANDINPUTDEVICEINTEGRATIONPLUGIN_H diff --git a/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp b/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp index c249248c320..eb4245627e3 100644 --- a/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp +++ b/src/plugins/platforms/wayland/plugins/decorations/bradient/main.cpp @@ -54,6 +54,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + #define BUTTON_SPACING 5 #ifndef QT_NO_IMAGEFORMAT_XPM @@ -446,6 +448,7 @@ QWaylandAbstractDecoration *QWaylandBradientDecorationPlugin::create(const QStri return new QWaylandBradientDecoration(); } +} QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/main.cpp index c023332ebd7..eb0d99c4c60 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/brcm-egl/main.cpp @@ -44,6 +44,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandBrcmEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin { Q_OBJECT @@ -59,6 +61,8 @@ QWaylandClientBufferIntegration *QWaylandBrcmEglClientBufferPlugin::create(const return new QWaylandBrcmEglIntegration(); } +} + QT_END_NAMESPACE #include "main.moc" diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/main.cpp index 6a3df4431fd..3a74a8f8e2d 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/drm-egl-server/main.cpp @@ -44,6 +44,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class DrmEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlugin { Q_OBJECT @@ -59,6 +61,8 @@ QWaylandServerBufferIntegration *DrmEglServerBufferPlugin::create(const QString& return new DrmEglServerBufferIntegration(); } +} + QT_END_NAMESPACE #include "main.moc" diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/main.cpp index 9aee157903e..18d002e2c3e 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/libhybris-egl-server/main.cpp @@ -44,6 +44,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class LibHybrisEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlugin { Q_OBJECT @@ -59,6 +61,8 @@ QWaylandServerBufferIntegration *LibHybrisEglServerBufferPlugin::create(const QS return new LibHybrisEglServerBufferIntegration(); } +} + QT_END_NAMESPACE #include "main.moc" diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/main.cpp index e4cd8c1f08c..020a41e02e2 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/wayland-egl/main.cpp @@ -44,6 +44,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin { Q_OBJECT @@ -59,6 +61,8 @@ QWaylandClientBufferIntegration *QWaylandEglClientBufferPlugin::create(const QSt return new QWaylandEglClientBufferIntegration(); } +} + QT_END_NAMESPACE #include "main.moc" diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/main.cpp index 4b9835f1d53..eddb5cbdcbe 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-egl/main.cpp @@ -44,6 +44,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandXCompositeEglClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin { Q_OBJECT @@ -59,6 +61,8 @@ QWaylandClientBufferIntegration *QWaylandXCompositeEglClientBufferIntegrationPlu return new QWaylandXCompositeEGLClientBufferIntegration(); } +} + QT_END_NAMESPACE #include "main.moc" diff --git a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/main.cpp b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/main.cpp index 2c6f0fde898..0b3c313346a 100644 --- a/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/main.cpp +++ b/src/plugins/platforms/wayland/plugins/hardwareintegration/xcomposite-glx/main.cpp @@ -44,6 +44,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandXCompositeGlxClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin { Q_OBJECT @@ -59,6 +61,8 @@ QWaylandClientBufferIntegration *QWaylandXCompositeGlxClientBufferIntegrationPlu return new QWaylandXCompositeGLXIntegration(); } +} + QT_END_NAMESPACE #include "main.moc" diff --git a/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp b/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp index e4b81bb8363..6ad78aaa348 100644 --- a/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp +++ b/src/plugins/platforms/wayland/qwaylandabstractdecoration.cpp @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandAbstractDecorationPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QWaylandAbstractDecoration) @@ -184,4 +186,6 @@ QWaylandWindow *QWaylandAbstractDecoration::waylandWindow() const return d->m_wayland_window; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandabstractdecoration_p.h b/src/plugins/platforms/wayland/qwaylandabstractdecoration_p.h index 6171cab14cb..891e67a8fbc 100644 --- a/src/plugins/platforms/wayland/qwaylandabstractdecoration_p.h +++ b/src/plugins/platforms/wayland/qwaylandabstractdecoration_p.h @@ -62,6 +62,9 @@ class QWindow; class QPaintDevice; class QPainter; class QEvent; + +namespace QtWaylandClient { + class QWaylandScreen; class QWaylandWindow; class QWaylandInputDevice; @@ -100,6 +103,8 @@ protected: bool isLeftReleased(Qt::MouseButtons newMouseButtonState); }; +} + QT_END_NAMESPACE #endif // QWAYLANDABSTRACTDECORATION_H diff --git a/src/plugins/platforms/wayland/qwaylandbuffer_p.h b/src/plugins/platforms/wayland/qwaylandbuffer_p.h index 0c9903f5a04..db6bbd9bb7f 100644 --- a/src/plugins/platforms/wayland/qwaylandbuffer_p.h +++ b/src/plugins/platforms/wayland/qwaylandbuffer_p.h @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class Q_WAYLAND_CLIENT_EXPORT QWaylandBuffer { public: QWaylandBuffer() { } @@ -64,6 +66,8 @@ protected: struct wl_buffer *mBuffer; }; +} + QT_END_NAMESPACE #endif // QWAYLANDBUFFER_H diff --git a/src/plugins/platforms/wayland/qwaylandclipboard.cpp b/src/plugins/platforms/wayland/qwaylandclipboard.cpp index c40f023b55a..226a374abfa 100644 --- a/src/plugins/platforms/wayland/qwaylandclipboard.cpp +++ b/src/plugins/platforms/wayland/qwaylandclipboard.cpp @@ -48,6 +48,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandClipboard::QWaylandClipboard(QWaylandDisplay *display) : mDisplay(display) { @@ -108,4 +110,6 @@ bool QWaylandClipboard::ownsMode(QClipboard::Mode mode) const return inputDevice->dataDevice()->selectionSource() != 0; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandclipboard_p.h b/src/plugins/platforms/wayland/qwaylandclipboard_p.h index 0dea3371ae9..6c181de1bfb 100644 --- a/src/plugins/platforms/wayland/qwaylandclipboard_p.h +++ b/src/plugins/platforms/wayland/qwaylandclipboard_p.h @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class Q_WAYLAND_CLIENT_EXPORT QWaylandClipboard : public QPlatformClipboard @@ -67,6 +69,8 @@ private: QWaylandDisplay *mDisplay; }; +} + QT_END_NAMESPACE #endif // QWAYLANDCLIPBOARD_H diff --git a/src/plugins/platforms/wayland/qwaylandcursor.cpp b/src/plugins/platforms/wayland/qwaylandcursor.cpp index 2a1339a79f4..8dd4bce1ac6 100644 --- a/src/plugins/platforms/wayland/qwaylandcursor.cpp +++ b/src/plugins/platforms/wayland/qwaylandcursor.cpp @@ -53,6 +53,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandCursor::QWaylandCursor(QWaylandScreen *screen) : mDisplay(screen->display()) { @@ -305,4 +307,6 @@ void QWaylandCursor::initCursorMap() mCursorNamesMap.insert(ResizeSouthWestCursor, "bottom_left_corner"); } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandcursor_p.h b/src/plugins/platforms/wayland/qwaylandcursor_p.h index 282ac685f5c..d832922d854 100644 --- a/src/plugins/platforms/wayland/qwaylandcursor_p.h +++ b/src/plugins/platforms/wayland/qwaylandcursor_p.h @@ -52,6 +52,8 @@ struct wl_cursor_theme; QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandScreen; @@ -111,6 +113,8 @@ private: QMultiMap mCursorNamesMap; }; +} + QT_END_NAMESPACE #endif // QWAYLANDCURSOR_H diff --git a/src/plugins/platforms/wayland/qwaylanddatadevice.cpp b/src/plugins/platforms/wayland/qwaylanddatadevice.cpp index edf73a56a3e..0d6ea711235 100644 --- a/src/plugins/platforms/wayland/qwaylanddatadevice.cpp +++ b/src/plugins/platforms/wayland/qwaylanddatadevice.cpp @@ -57,6 +57,10 @@ #include +QT_BEGIN_NAMESPACE + +namespace QtWaylandClient { + QWaylandDataDevice::QWaylandDataDevice(QWaylandDataDeviceManager *manager, QWaylandInputDevice *inputDevice) : QtWayland::wl_data_device(manager->get_data_device(inputDevice->wl_seat())) , m_display(manager->display()) @@ -249,3 +253,7 @@ void QWaylandDataDevice::dragSourceTargetChanged(const QString &mimeType) { static_cast(QGuiApplicationPrivate::platformIntegration()->drag())->updateTarget(mimeType); } + +} + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylanddatadevice_p.h b/src/plugins/platforms/wayland/qwaylanddatadevice_p.h index ef82d84ddb3..a80312c9423 100644 --- a/src/plugins/platforms/wayland/qwaylanddatadevice_p.h +++ b/src/plugins/platforms/wayland/qwaylanddatadevice_p.h @@ -48,12 +48,15 @@ QT_BEGIN_NAMESPACE -class QWaylandDisplay; class QMimeData; +class QWindow; + +namespace QtWaylandClient { + +class QWaylandDisplay; class QWaylandDataDeviceManager; class QWaylandDataOffer; class QWaylandDataSource; -class QWindow; class QWaylandInputDevice; class QWaylandWindow; @@ -99,6 +102,8 @@ private: QScopedPointer m_dragSource; }; +} + QT_END_NAMESPACE #endif // QWAYLANDDATADEVICE_H diff --git a/src/plugins/platforms/wayland/qwaylanddatadevicemanager.cpp b/src/plugins/platforms/wayland/qwaylanddatadevicemanager.cpp index ea578ff7b1d..c86d1ba8ab7 100644 --- a/src/plugins/platforms/wayland/qwaylanddatadevicemanager.cpp +++ b/src/plugins/platforms/wayland/qwaylanddatadevicemanager.cpp @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandDataDeviceManager::QWaylandDataDeviceManager(QWaylandDisplay *display, uint32_t id) : wl_data_device_manager(display->wl_registry(), id, 1) , m_display(display) @@ -77,5 +79,6 @@ QWaylandDisplay *QWaylandDataDeviceManager::display() const return m_display; } +} QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylanddatadevicemanager_p.h b/src/plugins/platforms/wayland/qwaylanddatadevicemanager_p.h index 3ed21d26a1f..e622f6150cf 100644 --- a/src/plugins/platforms/wayland/qwaylanddatadevicemanager_p.h +++ b/src/plugins/platforms/wayland/qwaylanddatadevicemanager_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandDataDevice; class QWaylandDataSource; @@ -66,6 +68,8 @@ private: QWaylandDisplay *m_display; }; +} + QT_END_NAMESPACE #endif // QWAYLANDDATADEVICEMANAGER_H diff --git a/src/plugins/platforms/wayland/qwaylanddataoffer.cpp b/src/plugins/platforms/wayland/qwaylanddataoffer.cpp index 4ad73dc7e77..10bf2f1e1ba 100644 --- a/src/plugins/platforms/wayland/qwaylanddataoffer.cpp +++ b/src/plugins/platforms/wayland/qwaylanddataoffer.cpp @@ -51,6 +51,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandDataOffer::QWaylandDataOffer(QWaylandDisplay *display, struct ::wl_data_offer *offer) : QtWayland::wl_data_offer(offer) , m_mimeData(new QWaylandMimeData(this, display)) @@ -161,4 +163,6 @@ int QWaylandMimeData::readData(int fd, QByteArray &data) const return n; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylanddataoffer_p.h b/src/plugins/platforms/wayland/qwaylanddataoffer_p.h index 12fc0a22f60..cdaf8a7bafc 100644 --- a/src/plugins/platforms/wayland/qwaylanddataoffer_p.h +++ b/src/plugins/platforms/wayland/qwaylanddataoffer_p.h @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandMimeData; @@ -91,6 +93,8 @@ private: mutable QHash m_data; }; +} + QT_END_NAMESPACE #endif diff --git a/src/plugins/platforms/wayland/qwaylanddatasource.cpp b/src/plugins/platforms/wayland/qwaylanddatasource.cpp index 3376db56748..cf92a361fb0 100644 --- a/src/plugins/platforms/wayland/qwaylanddatasource.cpp +++ b/src/plugins/platforms/wayland/qwaylanddatasource.cpp @@ -53,6 +53,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandDataSource::QWaylandDataSource(QWaylandDataDeviceManager *dataDeviceManager, QMimeData *mimeData) : QtWayland::wl_data_source(dataDeviceManager->create_data_source()) , m_mime_data(mimeData) @@ -93,4 +95,6 @@ void QWaylandDataSource::data_source_target(const QString &mime_type) Q_EMIT targetChanged(mime_type); } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylanddatasource_p.h b/src/plugins/platforms/wayland/qwaylanddatasource_p.h index a721336f7d8..09348f3354d 100644 --- a/src/plugins/platforms/wayland/qwaylanddatasource_p.h +++ b/src/plugins/platforms/wayland/qwaylanddatasource_p.h @@ -50,6 +50,9 @@ QT_BEGIN_NAMESPACE class QMimeData; + +namespace QtWaylandClient { + class QWaylandDataDeviceManager; class QWaylandDisplay; @@ -76,6 +79,8 @@ private: QMimeData *m_mime_data; }; +} + QT_END_NAMESPACE #endif // QWAYLANDDATASOURCE_H diff --git a/src/plugins/platforms/wayland/qwaylanddecorationfactory.cpp b/src/plugins/platforms/wayland/qwaylanddecorationfactory.cpp index 6f1f74693fe..4d36f7966ae 100644 --- a/src/plugins/platforms/wayland/qwaylanddecorationfactory.cpp +++ b/src/plugins/platforms/wayland/qwaylanddecorationfactory.cpp @@ -48,6 +48,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + #ifndef QT_NO_LIBRARY Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QWaylandDecorationFactoryInterface_iid, QLatin1String("/wayland-decoration-client"), Qt::CaseInsensitive)) @@ -94,4 +96,6 @@ QWaylandAbstractDecoration *QWaylandDecorationFactory::create(const QString &nam return 0; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylanddecorationfactory_p.h b/src/plugins/platforms/wayland/qwaylanddecorationfactory_p.h index a7729bcafda..144ae101be9 100644 --- a/src/plugins/platforms/wayland/qwaylanddecorationfactory_p.h +++ b/src/plugins/platforms/wayland/qwaylanddecorationfactory_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandAbstractDecoration; class Q_WAYLAND_CLIENT_EXPORT QWaylandDecorationFactory @@ -56,6 +58,8 @@ public: static QWaylandAbstractDecoration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString()); }; +} + QT_END_NAMESPACE #endif // QWAYLANDDECORATIONFACTORY_H diff --git a/src/plugins/platforms/wayland/qwaylanddecorationplugin.cpp b/src/plugins/platforms/wayland/qwaylanddecorationplugin.cpp index edad5f5f0af..3c6463a1f5e 100644 --- a/src/plugins/platforms/wayland/qwaylanddecorationplugin.cpp +++ b/src/plugins/platforms/wayland/qwaylanddecorationplugin.cpp @@ -43,6 +43,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandDecorationPlugin::QWaylandDecorationPlugin(QObject *parent) : QObject(parent) { @@ -51,4 +53,6 @@ QWaylandDecorationPlugin::~QWaylandDecorationPlugin() { } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylanddecorationplugin_p.h b/src/plugins/platforms/wayland/qwaylanddecorationplugin_p.h index 6ed8935db2a..9425bd348e9 100644 --- a/src/plugins/platforms/wayland/qwaylanddecorationplugin_p.h +++ b/src/plugins/platforms/wayland/qwaylanddecorationplugin_p.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandAbstractDecoration; #define QWaylandDecorationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandDecorationFactoryInterface.5.4" @@ -64,6 +66,8 @@ public: virtual QWaylandAbstractDecoration *create(const QString &key, const QStringList ¶mList) = 0; }; +} + QT_END_NAMESPACE #endif // QWAYLANDDECORATIONPLUGIN_H diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index a4d13db7178..ea7fe1a6a8b 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -76,6 +76,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + struct wl_surface *QWaylandDisplay::createSurface(void *handle) { struct wl_surface *surface = mCompositor.create_surface(); @@ -371,4 +373,6 @@ bool QWaylandDisplay::supportsWindowDecoration() const return integrationSupport; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylanddisplay_p.h b/src/plugins/platforms/wayland/qwaylanddisplay_p.h index 2f12ee7f9b3..9d4413f6fe6 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay_p.h +++ b/src/plugins/platforms/wayland/qwaylanddisplay_p.h @@ -58,10 +58,22 @@ struct wl_cursor_image; QT_BEGIN_NAMESPACE class QAbstractEventDispatcher; -class QWaylandInputDevice; class QSocketNotifier; -class QWaylandBuffer; class QPlatformScreen; + +namespace QtWayland { + class qt_output_extension; + class qt_shell; + class qt_sub_surface_extension; + class qt_surface_extension; + class wl_text_input_manager; + class xdg_shell; +} + +namespace QtWaylandClient { + +class QWaylandInputDevice; +class QWaylandBuffer; class QWaylandScreen; class QWaylandClientBufferIntegration; class QWaylandWindowManagerIntegration; @@ -75,15 +87,6 @@ class QWaylandHardwareIntegration; class QWaylandXdgShell; class QWaylandShellSurface; -namespace QtWayland { - class qt_output_extension; - class qt_shell; - class qt_sub_surface_extension; - class qt_surface_extension; - class wl_text_input_manager; - class xdg_shell; -} - typedef void (*RegistryListener)(void *data, struct wl_registry *registry, uint32_t id, @@ -211,6 +214,8 @@ private: int32_t width, int32_t height); }; +} + QT_END_NAMESPACE #endif // QWAYLANDDISPLAY_H diff --git a/src/plugins/platforms/wayland/qwaylanddnd.cpp b/src/plugins/platforms/wayland/qwaylanddnd.cpp index 996e647ccdc..514383d300a 100644 --- a/src/plugins/platforms/wayland/qwaylanddnd.cpp +++ b/src/plugins/platforms/wayland/qwaylanddnd.cpp @@ -53,6 +53,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandDrag::QWaylandDrag(QWaylandDisplay *display) : m_display(display) { @@ -134,4 +136,6 @@ void QWaylandDrag::finishDrag(const QPlatformDropQtResponse &response) eventFilter(shapedPixmapWindow(), &event); } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylanddnd_p.h b/src/plugins/platforms/wayland/qwaylanddnd_p.h index 1d236fad565..0154f122ffd 100644 --- a/src/plugins/platforms/wayland/qwaylanddnd_p.h +++ b/src/plugins/platforms/wayland/qwaylanddnd_p.h @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class Q_WAYLAND_CLIENT_EXPORT QWaylandDrag : public QBasicDrag @@ -78,6 +80,8 @@ private: QWaylandDisplay *m_display; }; +} + QT_END_NAMESPACE #endif // QWAYLANDDND_H diff --git a/src/plugins/platforms/wayland/qwaylandeventthread.cpp b/src/plugins/platforms/wayland/qwaylandeventthread.cpp index 22efd6a2a72..6cce6c19d69 100644 --- a/src/plugins/platforms/wayland/qwaylandeventthread.cpp +++ b/src/plugins/platforms/wayland/qwaylandeventthread.cpp @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandEventThread::QWaylandEventThread(QObject *parent) : QObject(parent) , m_display(0) @@ -117,4 +119,6 @@ wl_display *QWaylandEventThread::display() const return m_display; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandeventthread_p.h b/src/plugins/platforms/wayland/qwaylandeventthread_p.h index 2df4b05c2e5..b96c97c2a99 100644 --- a/src/plugins/platforms/wayland/qwaylandeventthread_p.h +++ b/src/plugins/platforms/wayland/qwaylandeventthread_p.h @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE class QSocketNotifier; +namespace QtWaylandClient { + class Q_WAYLAND_CLIENT_EXPORT QWaylandEventThread : public QObject { Q_OBJECT @@ -85,6 +87,8 @@ private: }; +} + QT_END_NAMESPACE #endif // QWAYLANDEVENTTHREAD_H diff --git a/src/plugins/platforms/wayland/qwaylandextendedoutput.cpp b/src/plugins/platforms/wayland/qwaylandextendedoutput.cpp index bb6a4779e90..26fba99e461 100644 --- a/src/plugins/platforms/wayland/qwaylandextendedoutput.cpp +++ b/src/plugins/platforms/wayland/qwaylandextendedoutput.cpp @@ -49,10 +49,13 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandExtendedOutput::QWaylandExtendedOutput(QWaylandScreen *screen, ::qt_extended_output *extended_output) : QtWayland::qt_extended_output(extended_output) { Q_UNUSED(screen); } +} QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandextendedoutput_p.h b/src/plugins/platforms/wayland/qwaylandextendedoutput_p.h index 35ac194a427..0ac24d606bd 100644 --- a/src/plugins/platforms/wayland/qwaylandextendedoutput_p.h +++ b/src/plugins/platforms/wayland/qwaylandextendedoutput_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandScreen; class QWaylandExtendedOutput; @@ -57,6 +59,8 @@ public: QWaylandExtendedOutput(QWaylandScreen *screen, struct ::qt_extended_output *extended_output); }; +} + QT_END_NAMESPACE #endif // QWAYLANDEXTENDEDOUTPUT_H diff --git a/src/plugins/platforms/wayland/qwaylandextendedsurface.cpp b/src/plugins/platforms/wayland/qwaylandextendedsurface.cpp index e589698ef6f..5cb5ec04997 100644 --- a/src/plugins/platforms/wayland/qwaylandextendedsurface.cpp +++ b/src/plugins/platforms/wayland/qwaylandextendedsurface.cpp @@ -53,6 +53,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandExtendedSurface::QWaylandExtendedSurface(QWaylandWindow *window) : QtWayland::qt_extended_surface(window->display()->windowExtension()->get_extended_surface(window->object())) , m_window(window) @@ -123,4 +125,6 @@ Qt::WindowFlags QWaylandExtendedSurface::setWindowFlags(Qt::WindowFlags flags) return flags & (Qt::WindowStaysOnTopHint | Qt::WindowOverridesSystemGestures | Qt::BypassWindowManagerHint); } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandextendedsurface_p.h b/src/plugins/platforms/wayland/qwaylandextendedsurface_p.h index 1d966292c58..fe0ea593844 100644 --- a/src/plugins/platforms/wayland/qwaylandextendedsurface_p.h +++ b/src/plugins/platforms/wayland/qwaylandextendedsurface_p.h @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandWindow; @@ -76,6 +78,8 @@ private: QVariantMap m_properties; }; +} + QT_END_NAMESPACE #endif // QWAYLANDEXTENDEDSURFACE_H diff --git a/src/plugins/platforms/wayland/qwaylandinputcontext.cpp b/src/plugins/platforms/wayland/qwaylandinputcontext.cpp index e189b945134..e2b346223ac 100644 --- a/src/plugins/platforms/wayland/qwaylandinputcontext.cpp +++ b/src/plugins/platforms/wayland/qwaylandinputcontext.cpp @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + static Qt::Key toQtKey(uint32_t sym) { #ifndef QT_NO_WAYLAND_XKB @@ -277,5 +279,7 @@ bool QWaylandInputContext::ensureTextInput() return true; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandinputcontext_p.h b/src/plugins/platforms/wayland/qwaylandinputcontext_p.h index fbb26b9bf9d..02dd512a289 100644 --- a/src/plugins/platforms/wayland/qwaylandinputcontext_p.h +++ b/src/plugins/platforms/wayland/qwaylandinputcontext_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandTextInput : public QtWayland::wl_text_input @@ -99,6 +101,8 @@ private: QScopedPointer mTextInput; }; +} + QT_END_NAMESPACE #endif // QWAYLANDINPUTCONTEXT_H diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp index ada2cf2b5a4..6b6abfe5f18 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp +++ b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp @@ -65,6 +65,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandInputDevice::Keyboard::Keyboard(QWaylandInputDevice *p) : mParent(p) , mFocus(0) @@ -973,4 +975,6 @@ void QWaylandInputDevice::Touch::touch_frame() mTouchPoints.clear(); } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice_p.h b/src/plugins/platforms/wayland/qwaylandinputdevice_p.h index a5da8bd0fee..238e5964ab3 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice_p.h +++ b/src/plugins/platforms/wayland/qwaylandinputdevice_p.h @@ -66,6 +66,7 @@ struct wl_cursor_image; QT_BEGIN_NAMESPACE +namespace QtWaylandClient { class QWaylandWindow; class QWaylandDisplay; @@ -284,6 +285,8 @@ public: Qt::KeyboardModifiers modifiers; }; +} + QT_END_NAMESPACE #endif diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 27613eef714..60dc1b49254 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -82,6 +82,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class GenericWaylandTheme: public QGenericUnixTheme { public: @@ -395,4 +397,6 @@ void QWaylandIntegration::initializeInputDeviceIntegration() } } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandintegration_p.h b/src/plugins/platforms/wayland/qwaylandintegration_p.h index c0909418e76..745b88a6f88 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration_p.h +++ b/src/plugins/platforms/wayland/qwaylandintegration_p.h @@ -47,6 +47,8 @@ #include QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandBuffer; class QWaylandDisplay; class QWaylandClientBufferIntegration; @@ -125,6 +127,8 @@ private: friend class QWaylandDisplay; }; +} + QT_END_NAMESPACE #endif diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp index b4bb0604dba..c4878e54064 100644 --- a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp +++ b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp @@ -53,6 +53,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandNativeInterface::QWaylandNativeInterface(QWaylandIntegration *integration) : m_integration(integration) { @@ -147,4 +149,6 @@ void QWaylandNativeInterface::emitWindowPropertyChanged(QPlatformWindow *window, emit windowPropertyChanged(window,name); } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h b/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h index 9d0aafdd595..6f6a62b76b8 100644 --- a/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h +++ b/src/plugins/platforms/wayland/qwaylandnativeinterface_p.h @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandIntegration; class QWaylandScreen; @@ -75,6 +77,8 @@ private: QHash m_windowProperties; }; +} + QT_END_NAMESPACE #endif // QWAYLANDNATIVEINTERFACE_H diff --git a/src/plugins/platforms/wayland/qwaylandqtkey.cpp b/src/plugins/platforms/wayland/qwaylandqtkey.cpp index 16562357f00..1eda126cfe0 100644 --- a/src/plugins/platforms/wayland/qwaylandqtkey.cpp +++ b/src/plugins/platforms/wayland/qwaylandqtkey.cpp @@ -45,6 +45,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandQtKeyExtension::QWaylandQtKeyExtension(QWaylandDisplay *display, uint32_t id) : QtWayland::qt_key_extension(display->wl_registry(), id, 2) , m_display(display) @@ -83,4 +85,6 @@ void QWaylandQtKeyExtension::key_extension_qtkey(struct wl_surface *surface, autorep, count); } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandqtkey_p.h b/src/plugins/platforms/wayland/qwaylandqtkey_p.h index d00a90ee032..f705775c4ad 100644 --- a/src/plugins/platforms/wayland/qwaylandqtkey_p.h +++ b/src/plugins/platforms/wayland/qwaylandqtkey_p.h @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class Q_WAYLAND_CLIENT_EXPORT QWaylandQtKeyExtension : public QtWayland::qt_key_extension @@ -73,6 +75,8 @@ private: }; +} + QT_END_NAMESPACE #endif // QWAYLANDQTKEY_H diff --git a/src/plugins/platforms/wayland/qwaylandscreen.cpp b/src/plugins/platforms/wayland/qwaylandscreen.cpp index 675c8404236..a1aff8d1cf5 100644 --- a/src/plugins/platforms/wayland/qwaylandscreen.cpp +++ b/src/plugins/platforms/wayland/qwaylandscreen.cpp @@ -53,6 +53,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uint32_t id) : QPlatformScreen() , QtWayland::wl_output(waylandDisplay->wl_registry(), id, qMin(version, 2)) @@ -242,4 +244,6 @@ void QWaylandScreen::output_done() QWindowSystemInterface::handleScreenRefreshRateChange(screen(), refreshRate()); } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandscreen_p.h b/src/plugins/platforms/wayland/qwaylandscreen_p.h index d0c5d710fe4..c337d9be3c1 100644 --- a/src/plugins/platforms/wayland/qwaylandscreen_p.h +++ b/src/plugins/platforms/wayland/qwaylandscreen_p.h @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandCursor; class QWaylandExtendedOutput; @@ -116,6 +118,8 @@ private: QWaylandCursor *mWaylandCursor; }; +} + QT_END_NAMESPACE #endif // QWAYLANDSCREEN_H diff --git a/src/plugins/platforms/wayland/qwaylandshellsurface.cpp b/src/plugins/platforms/wayland/qwaylandshellsurface.cpp index a3855dac0d6..997d4ac5bac 100644 --- a/src/plugins/platforms/wayland/qwaylandshellsurface.cpp +++ b/src/plugins/platforms/wayland/qwaylandshellsurface.cpp @@ -43,6 +43,10 @@ #include "qwaylandwindow_p.h" #include "qwaylandextendedsurface_p.h" +QT_BEGIN_NAMESPACE + +namespace QtWaylandClient { + QWaylandShellSurface::QWaylandShellSurface(QWaylandWindow *window) : m_window(window) { @@ -58,3 +62,7 @@ void QWaylandShellSurface::sendProperty(const QString &name, const QVariant &val Q_UNUSED(name) Q_UNUSED(value) } + +} + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandshellsurface_p.h b/src/plugins/platforms/wayland/qwaylandshellsurface_p.h index 6f2336162c2..28e55be3541 100644 --- a/src/plugins/platforms/wayland/qwaylandshellsurface_p.h +++ b/src/plugins/platforms/wayland/qwaylandshellsurface_p.h @@ -52,9 +52,12 @@ QT_BEGIN_NAMESPACE class QVariant; +class QWindow; + +namespace QtWaylandClient { + class QWaylandWindow; class QWaylandInputDevice; -class QWindow; class Q_WAYLAND_CLIENT_EXPORT QWaylandShellSurface { @@ -94,6 +97,8 @@ private: friend class QWaylandWindow; }; +} + QT_END_NAMESPACE #endif // QWAYLANDSHELLSURFACE_H diff --git a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp index 9bb36fdc76f..64e93d94713 100644 --- a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp +++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp @@ -56,6 +56,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *display, const QSize &size, QImage::Format format, int scale) : mMarginsImage(0) @@ -372,4 +374,6 @@ const struct wl_callback_listener QWaylandShmBackingStore::frameCallbackListener QWaylandShmBackingStore::done }; +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h b/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h index 397d6bdbf16..a6db31c9817 100644 --- a/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h +++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore_p.h @@ -51,6 +51,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandAbstractDecoration; class QWaylandWindow; @@ -120,6 +122,8 @@ private: struct wl_callback *mFrameCallback; }; +} + QT_END_NAMESPACE #endif diff --git a/src/plugins/platforms/wayland/qwaylandshmwindow.cpp b/src/plugins/platforms/wayland/qwaylandshmwindow.cpp index 431ed2fdb97..d2599370a78 100644 --- a/src/plugins/platforms/wayland/qwaylandshmwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandshmwindow.cpp @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandShmWindow::QWaylandShmWindow(QWindow *window) : QWaylandWindow(window) { @@ -63,4 +65,6 @@ QWaylandWindow::WindowType QWaylandShmWindow::windowType() const return QWaylandWindow::Shm; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandshmwindow_p.h b/src/plugins/platforms/wayland/qwaylandshmwindow_p.h index 47ee742699d..1c0c5c15efc 100644 --- a/src/plugins/platforms/wayland/qwaylandshmwindow_p.h +++ b/src/plugins/platforms/wayland/qwaylandshmwindow_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class Q_WAYLAND_CLIENT_EXPORT QWaylandShmWindow : public QWaylandWindow { public: @@ -57,6 +59,8 @@ public: QSurfaceFormat format() const { return QSurfaceFormat(); } }; +} + QT_END_NAMESPACE #endif // QWAYLANDSHMWINDOW_H diff --git a/src/plugins/platforms/wayland/qwaylandsubsurface.cpp b/src/plugins/platforms/wayland/qwaylandsubsurface.cpp index 6db59fa206c..19ba3248db3 100644 --- a/src/plugins/platforms/wayland/qwaylandsubsurface.cpp +++ b/src/plugins/platforms/wayland/qwaylandsubsurface.cpp @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandSubSurface::QWaylandSubSurface(QWaylandWindow *window, struct ::qt_sub_surface *sub_surface) : QtWayland::qt_sub_surface(sub_surface) , m_window(window) @@ -88,4 +90,6 @@ void QWaylandSubSurface::adjustPositionOfChildren() setPositionToParent(m_window); } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandsubsurface_p.h b/src/plugins/platforms/wayland/qwaylandsubsurface_p.h index bd0da96d214..93b767352b7 100644 --- a/src/plugins/platforms/wayland/qwaylandsubsurface_p.h +++ b/src/plugins/platforms/wayland/qwaylandsubsurface_p.h @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandWindow; class QWaylandSubSurface; @@ -70,4 +72,6 @@ private: QT_END_NAMESPACE +} + #endif // QWAYLANDSUBSURFACE_H diff --git a/src/plugins/platforms/wayland/qwaylandtouch.cpp b/src/plugins/platforms/wayland/qwaylandtouch.cpp index 3dabd1ea504..f2b85c225cd 100644 --- a/src/plugins/platforms/wayland/qwaylandtouch.cpp +++ b/src/plugins/platforms/wayland/qwaylandtouch.cpp @@ -45,6 +45,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandTouchExtension::QWaylandTouchExtension(QWaylandDisplay *display, uint32_t id) : QtWayland::qt_touch_extension(display->wl_registry(), id, 1), mDisplay(display), @@ -207,4 +209,6 @@ void QWaylandTouchExtension::touch_extension_configure(uint32_t flags) mFlags = flags; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandtouch_p.h b/src/plugins/platforms/wayland/qwaylandtouch_p.h index 20827fa8f94..bbe15992999 100644 --- a/src/plugins/platforms/wayland/qwaylandtouch_p.h +++ b/src/plugins/platforms/wayland/qwaylandtouch_p.h @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandInputDevice; @@ -95,6 +97,8 @@ private: QWaylandInputDevice *mInputDevice; }; +} + QT_END_NAMESPACE #endif // QWAYLANDTOUCH_H diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 08a123b61ce..cf4e0e67218 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -67,6 +67,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandWindow *QWaylandWindow::mMouseGrab = 0; QWaylandWindow::QWaylandWindow(QWindow *window) @@ -809,4 +811,6 @@ QVariant QWaylandWindow::property(const QString &name, const QVariant &defaultVa return m_properties.value(name, defaultValue); } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandwindow_p.h b/src/plugins/platforms/wayland/qwaylandwindow_p.h index 2650f46d17c..de59e4e20b6 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow_p.h +++ b/src/plugins/platforms/wayland/qwaylandwindow_p.h @@ -56,6 +56,8 @@ struct wl_egl_window; QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandDisplay; class QWaylandBuffer; class QWaylandShellSurface; @@ -253,4 +255,6 @@ inline QPoint QWaylandWindow::attachOffset() const QT_END_NAMESPACE +} + #endif // QWAYLANDWINDOW_H diff --git a/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration.cpp b/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration.cpp index 174ef93a548..44f93815e71 100644 --- a/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration.cpp @@ -57,6 +57,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandWindowManagerIntegrationPrivate { public: QWaylandWindowManagerIntegrationPrivate(QWaylandDisplay *waylandDisplay); @@ -157,4 +159,6 @@ bool QWaylandWindowManagerIntegration::openDocument(const QUrl &url) return true; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration_p.h b/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration_p.h index 0ad2e38dfb3..4ecad94e023 100644 --- a/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration_p.h +++ b/src/plugins/platforms/wayland/qwaylandwindowmanagerintegration_p.h @@ -53,6 +53,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandWindow; class QWaylandDisplay; @@ -87,4 +89,6 @@ private: QT_END_NAMESPACE +} + #endif // QWAYLANDWINDOWMANAGERINTEGRATION_H diff --git a/src/plugins/platforms/wayland/qwaylandwlshellsurface.cpp b/src/plugins/platforms/wayland/qwaylandwlshellsurface.cpp index 86115fa38b2..550e6caebb1 100644 --- a/src/plugins/platforms/wayland/qwaylandwlshellsurface.cpp +++ b/src/plugins/platforms/wayland/qwaylandwlshellsurface.cpp @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandWlShellSurface::QWaylandWlShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window) : QtWayland::wl_shell_surface(shell_surface) , QWaylandShellSurface(window) @@ -219,4 +221,6 @@ void QWaylandWlShellSurface::shell_surface_popup_done() QCoreApplication::postEvent(m_window->window(), new QCloseEvent()); } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandwlshellsurface_p.h b/src/plugins/platforms/wayland/qwaylandwlshellsurface_p.h index 8d6e298b9da..54917b56052 100644 --- a/src/plugins/platforms/wayland/qwaylandwlshellsurface_p.h +++ b/src/plugins/platforms/wayland/qwaylandwlshellsurface_p.h @@ -52,9 +52,12 @@ QT_BEGIN_NAMESPACE +class QWindow; + +namespace QtWaylandClient { + class QWaylandWindow; class QWaylandInputDevice; -class QWindow; class QWaylandExtendedSurface; class Q_WAYLAND_CLIENT_EXPORT QWaylandWlShellSurface : public QtWayland::wl_shell_surface @@ -106,4 +109,6 @@ private: QT_END_NAMESPACE +} + #endif // QWAYLANDSHELLSURFACE_H diff --git a/src/plugins/platforms/wayland/qwaylandxdgshell.cpp b/src/plugins/platforms/wayland/qwaylandxdgshell.cpp index f31d63f4266..20a6da5e596 100644 --- a/src/plugins/platforms/wayland/qwaylandxdgshell.cpp +++ b/src/plugins/platforms/wayland/qwaylandxdgshell.cpp @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandXdgShell::QWaylandXdgShell(struct ::xdg_shell *shell) : QtWayland::xdg_shell(shell) { @@ -72,5 +74,6 @@ void QWaylandXdgShell::xdg_shell_ping(uint32_t serial) pong(serial); } +} QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandxdgshell_p.h b/src/plugins/platforms/wayland/qwaylandxdgshell_p.h index 6a396bd1178..f2e2e7bb409 100644 --- a/src/plugins/platforms/wayland/qwaylandxdgshell_p.h +++ b/src/plugins/platforms/wayland/qwaylandxdgshell_p.h @@ -52,9 +52,12 @@ QT_BEGIN_NAMESPACE +class QWindow; + +namespace QtWaylandClient { + class QWaylandWindow; class QWaylandInputDevice; -class QWindow; class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShell : public QtWayland::xdg_shell { @@ -70,4 +73,6 @@ private: QT_END_NAMESPACE +} + #endif // QWAYLANDXDGSHELL_H diff --git a/src/plugins/platforms/wayland/qwaylandxdgsurface.cpp b/src/plugins/platforms/wayland/qwaylandxdgsurface.cpp index 7f0c7f418f6..611a01bb69b 100644 --- a/src/plugins/platforms/wayland/qwaylandxdgsurface.cpp +++ b/src/plugins/platforms/wayland/qwaylandxdgsurface.cpp @@ -51,6 +51,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandXdgSurface::QWaylandXdgSurface(struct ::xdg_surface *xdg_surface, QWaylandWindow *window) : QtWayland::xdg_surface(xdg_surface) , QWaylandShellSurface(window) @@ -240,4 +242,6 @@ void QWaylandXdgSurface::xdg_surface_close() { } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandxdgsurface_p.h b/src/plugins/platforms/wayland/qwaylandxdgsurface_p.h index c5ae9c792c5..862e177a1f2 100644 --- a/src/plugins/platforms/wayland/qwaylandxdgsurface_p.h +++ b/src/plugins/platforms/wayland/qwaylandxdgsurface_p.h @@ -53,9 +53,12 @@ QT_BEGIN_NAMESPACE +class QWindow; + +namespace QtWaylandClient { + class QWaylandWindow; class QWaylandInputDevice; -class QWindow; class QWaylandExtendedSurface; class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgSurface : public QtWayland::xdg_surface @@ -114,4 +117,6 @@ private: QT_END_NAMESPACE +} + #endif // QWAYLANDXDGSURFACE_H diff --git a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegration_p.h b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegration_p.h index 45a78199cb4..31fa98edb1e 100644 --- a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegration_p.h +++ b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegration_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandWindow; class QWaylandDisplay; class QWaylandShellSurface; @@ -61,6 +63,8 @@ public: virtual QWaylandShellSurface *createShellSurface(QWaylandWindow *window) = 0; }; +} + QT_END_NAMESPACE #endif // QWAYLANDSHELLINTEGRATION_H diff --git a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp index f780409e1fa..4af65d4c074 100644 --- a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp +++ b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory.cpp @@ -48,6 +48,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + #ifndef QT_NO_LIBRARY Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QWaylandShellIntegrationFactoryInterface_iid, QLatin1String("/wayland-shell-integration"), Qt::CaseInsensitive)) @@ -93,4 +95,6 @@ QWaylandShellIntegration *QWaylandShellIntegrationFactory::create(const QString return Q_NULLPTR; } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory_p.h b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory_p.h index 415067ef8c1..3b7fa357dc3 100644 --- a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory_p.h +++ b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationfactory_p.h @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandShellIntegration; class Q_WAYLAND_CLIENT_EXPORT QWaylandShellIntegrationFactory @@ -56,6 +58,8 @@ public: static QWaylandShellIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString()); }; +} + QT_END_NAMESPACE #endif // QWAYLANDSHELLINTEGRATIONFACTORY_H diff --git a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationplugin.cpp b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationplugin.cpp index 05b5e91ad59..bbca1558d35 100644 --- a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationplugin.cpp +++ b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationplugin.cpp @@ -43,6 +43,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandShellIntegrationPlugin::QWaylandShellIntegrationPlugin(QObject *parent) : QObject(parent) { @@ -52,4 +54,6 @@ QWaylandShellIntegrationPlugin::~QWaylandShellIntegrationPlugin() { } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationplugin_p.h b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationplugin_p.h index 7d01fb4e598..07438e7a6f6 100644 --- a/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationplugin_p.h +++ b/src/plugins/platforms/wayland/shellintegration/qwaylandshellintegrationplugin_p.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandShellIntegration; #define QWaylandShellIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandShellIntegrationFactoryInterface.5.3" @@ -64,6 +66,8 @@ public: virtual QWaylandShellIntegration *create(const QString &key, const QStringList ¶mList) = 0; }; +} + QT_END_NAMESPACE #endif // QWAYLANDSHELLINTEGRATIONPLUGIN_H