From e6255beec9114afd1fad9e7d62ebec433a627d54 Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Thu, 29 Jan 2015 14:35:44 +0200 Subject: 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 --- .../client/brcm-egl/qwaylandbrcmeglintegration.cpp | 4 ++++ .../client/brcm-egl/qwaylandbrcmeglintegration.h | 9 +++++++-- .../client/brcm-egl/qwaylandbrcmeglwindow.cpp | 4 ++++ src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h | 4 ++++ .../client/brcm-egl/qwaylandbrcmglcontext.cpp | 4 ++++ src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h | 4 ++++ 6 files changed, 27 insertions(+), 2 deletions(-) (limited to 'src/hardwareintegration/client/brcm-egl') diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp index f1e14c10c..5a80681cc 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + QWaylandBrcmEglIntegration::QWaylandBrcmEglIntegration() : m_waylandDisplay(0) { @@ -125,4 +127,6 @@ EGLDisplay QWaylandBrcmEglIntegration::eglDisplay() const return m_eglDisplay; } +} + QT_END_NAMESPACE diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h index 7f573cb91..5699803b2 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h @@ -52,12 +52,15 @@ #include +struct qt_brcm; + QT_BEGIN_NAMESPACE -class QWaylandWindow; class QWindow; -struct qt_brcm; +namespace QtWaylandClient { + +class QWaylandWindow; class QWaylandBrcmEglIntegration : public QWaylandClientBufferIntegration { @@ -90,6 +93,8 @@ private: EGLDisplay m_eglDisplay; }; +} + QT_END_NAMESPACE #endif // QWAYLANDBRCMEGLINTEGRATION_H diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp index 3ca72a772..2fe4e0a56 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp @@ -58,6 +58,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandBrcmBuffer : public QWaylandBuffer { public: @@ -264,4 +266,6 @@ bool QWaylandBrcmEglWindow::makeCurrent(EGLContext context) return eglMakeCurrent(m_eglIntegration->eglDisplay(), m_eglSurfaces[m_current], m_eglSurfaces[m_current], context); } +} + QT_END_NAMESPACE diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h index bc8f12d1f..8c240c897 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h @@ -51,6 +51,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandGLContext; class QWaylandBrcmBuffer; @@ -93,6 +95,8 @@ private: QMutex m_mutex; }; +} + QT_END_NAMESPACE #endif // QWAYLANDBRCMEGLWINDOW_H diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp index 85b7b49f0..d5af81a90 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + extern QSurfaceFormat brcmFixFormat(const QSurfaceFormat &format); QWaylandBrcmGLContext::QWaylandBrcmGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformOpenGLContext *share) @@ -102,4 +104,6 @@ EGLConfig QWaylandBrcmGLContext::eglConfig() const return m_config; } +} + QT_END_NAMESPACE diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h index a66c0a601..ac8d2f56d 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE +namespace QtWaylandClient { + class QWaylandWindow; class QWaylandGLWindowSurface; @@ -78,6 +80,8 @@ private: QSurfaceFormat m_format; }; +} + QT_END_NAMESPACE #endif // QWAYLANDBRCMGLCONTEXT_H -- cgit v1.2.3