summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-07-18 14:03:54 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-07-23 08:38:19 +0200
commitfa9c133cc3799bfcf027e6b3d4983bd4cfd5db6d (patch)
tree8a7777e2d32ac8346a1bf59b5e711ca74e66dc70 /src
parentede872db1cdfdc2810c2dd29edd5fb6e1cdac0f5 (diff)
fix namespaced build
rule 1: QT_USE_NAMESPACE in qt code itself is a bad idea rule 2: don't forget to forward-declare your non-qt types Change-Id: Ifba69328f3451e708c26624f349485e7c61d31f5 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/compositor/compositor_api/qwaylandsurfaceitem.cpp4
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp3
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp3
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmglcontext.cpp3
-rw-r--r--src/plugins/platforms/qwayland-egl/qwaylandeglintegration.cpp4
-rw-r--r--src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp4
-rw-r--r--src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp3
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglcontext.cpp4
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp3
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp3
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxcontext.cpp3
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxintegration.cpp3
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxwindow.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandclipboard.cpp3
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandcursor.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandcursor.h5
-rw-r--r--src/plugins/platforms/wayland_common/qwaylanddatadevicemanager.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylanddataoffer.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylanddataoffer.h3
-rw-r--r--src/plugins/platforms/wayland_common/qwaylanddatasource.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylanddecoration.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylanddisplay.cpp3
-rw-r--r--src/plugins/platforms/wayland_common/qwaylanddisplay.h2
-rw-r--r--src/plugins/platforms/wayland_common/qwaylanddnd.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandeventthread.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandeventthread.h4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandextendedoutput.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandextendedsurface.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandglintegration.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandinputdevice.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandintegration.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandnativeinterface.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandqtkey.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandscreen.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandshellsurface.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandshmbackingstore.cpp1
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandshmwindow.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandsubsurface.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandtouch.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandwindow.cpp4
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandwindowmanagerintegration.cpp4
-rw-r--r--src/plugins/platforms/xcomposite_share/qwaylandxcompositebuffer.cpp4
-rw-r--r--src/plugins/waylandcompositors/brcm-egl/brcmbuffer.cpp4
-rw-r--r--src/plugins/waylandcompositors/brcm-egl/brcmeglintegration.cpp4
-rw-r--r--src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp3
-rw-r--r--src/plugins/waylandcompositors/xcomposite-egl/xcompositeeglintegration.cpp4
-rw-r--r--src/plugins/waylandcompositors/xcomposite-glx/xcompositeglxintegration.cpp4
-rw-r--r--src/plugins/waylandcompositors/xcomposite_share/xcompositebuffer.cpp4
-rw-r--r--src/plugins/waylandcompositors/xcomposite_share/xcompositehandler.cpp4
-rw-r--r--src/shared/qwaylandmimehelper.cpp4
50 files changed, 136 insertions, 48 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurfaceitem.cpp b/src/compositor/compositor_api/qwaylandsurfaceitem.cpp
index 388465ef5..f60a3fa4c 100644
--- a/src/compositor/compositor_api/qwaylandsurfaceitem.cpp
+++ b/src/compositor/compositor_api/qwaylandsurfaceitem.cpp
@@ -453,6 +453,6 @@ void QWaylandSurfaceItem::setResizeSurfaceToItem(bool enabled)
}
}
-#include "qwaylandsurfaceitem.moc"
-
QT_END_NAMESPACE
+
+#include "qwaylandsurfaceitem.moc"
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp
index ebe5a4d6b..55cc25b89 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp
+++ b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp
@@ -50,7 +50,7 @@
#include "wayland-brcm-client-protocol.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandBrcmEglIntegration::QWaylandBrcmEglIntegration(QWaylandDisplay *waylandDisplay)
: m_waylandDisplay(waylandDisplay->wl_display())
@@ -129,3 +129,4 @@ QWaylandGLIntegration *QWaylandGLIntegration::createGLIntegration(QWaylandDispla
return new QWaylandBrcmEglIntegration(waylandDisplay);
}
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp
index 78c0f465e..6aa3f558c 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp
+++ b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp
@@ -55,7 +55,7 @@
#include "wayland-brcm-client-protocol.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
class QWaylandBrcmBuffer : public QWaylandBuffer
{
@@ -290,3 +290,4 @@ 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/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmglcontext.cpp b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmglcontext.cpp
index 14b989870..dfb86e54c 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmglcontext.cpp
+++ b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmglcontext.cpp
@@ -50,7 +50,7 @@
#include <qpa/qplatformopenglcontext.h>
#include <QtGui/QSurfaceFormat>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
extern QSurfaceFormat brcmFixFormat(const QSurfaceFormat &format);
@@ -102,3 +102,4 @@ EGLConfig QWaylandBrcmGLContext::eglConfig() const
return m_config;
}
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglintegration.cpp b/src/plugins/platforms/qwayland-egl/qwaylandeglintegration.cpp
index 7a65f89c3..07f6d586e 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglintegration.cpp
+++ b/src/plugins/platforms/qwayland-egl/qwaylandeglintegration.cpp
@@ -50,7 +50,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandEglIntegration::QWaylandEglIntegration(struct wl_display *waylandDisplay)
: m_waylandDisplay(waylandDisplay)
@@ -107,3 +107,5 @@ QWaylandGLIntegration *QWaylandGLIntegration::createGLIntegration(QWaylandDispla
{
return new QWaylandEglIntegration(waylandDisplay->wl_display());
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp b/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp
index d42313466..7829f381a 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp
+++ b/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp
@@ -52,7 +52,7 @@
#include <QOpenGLFramebufferObject>
#include <QOpenGLContext>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandEglWindow::QWaylandEglWindow(QWindow *window)
: QWaylandWindow(window)
@@ -167,3 +167,5 @@ void QWaylandEglWindow::bindContentFBO()
m_contentFBO->bind();
}
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp b/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp
index e28f0d172..ccfa0085c 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp
+++ b/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp
@@ -55,7 +55,7 @@
#include <QtGui/QSurfaceFormat>
#include <QtGui/QOpenGLShaderProgram>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandGLContext::QWaylandGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformOpenGLContext *share)
: QPlatformOpenGLContext()
@@ -250,3 +250,4 @@ EGLConfig QWaylandGLContext::eglConfig() const
return m_config;
}
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglcontext.cpp b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglcontext.cpp
index 991999edd..8d4a99b97 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglcontext.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglcontext.cpp
@@ -48,7 +48,7 @@
#include <QtPlatformSupport/private/qeglconvenience_p.h>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandXCompositeEGLContext::QWaylandXCompositeEGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display)
: QEGLPlatformContext(format, share, display, q_configFromGLFormat(display, format, true, EGL_WINDOW_BIT | EGL_PIXMAP_BIT), EGL_OPENGL_ES_API)
@@ -73,3 +73,5 @@ EGLSurface QWaylandXCompositeEGLContext::eglSurfaceForPlatformSurface(QPlatformS
{
return static_cast<QWaylandXCompositeEGLWindow *>(surface)->eglSurface();
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp
index 2d054f8e6..cd3a06ff8 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp
@@ -47,7 +47,7 @@
#include "wayland-xcomposite-client-protocol.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandGLIntegration * QWaylandGLIntegration::createGLIntegration(QWaylandDisplay *waylandDisplay)
{
@@ -143,3 +143,4 @@ void QWaylandXCompositeEGLIntegration::rootInformation(void *data, qt_xcomposite
qDebug() << "ROOT INFORMATION" << integration->mDisplay << integration->mRootWindow << integration->mScreen;
}
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp
index 3a040d141..f0df2bd2d 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp
@@ -52,7 +52,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandXCompositeEGLWindow::QWaylandXCompositeEGLWindow(QWindow *window, QWaylandXCompositeEGLIntegration *glxIntegration)
: QWaylandWindow(window)
@@ -134,3 +134,4 @@ void QWaylandXCompositeEGLWindow::createEglSurface()
attach(m_buffer, 0, 0);
}
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxcontext.cpp b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxcontext.cpp
index 687ab4db0..6854dc3b2 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxcontext.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxcontext.cpp
@@ -47,7 +47,7 @@
#include <QRegion>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandXCompositeGLXContext::QWaylandXCompositeGLXContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, Display *display, int screen)
: m_display(display)
@@ -95,3 +95,4 @@ QSurfaceFormat QWaylandXCompositeGLXContext::format() const
return m_format;
}
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxintegration.cpp b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxintegration.cpp
index e3316d96f..e4e49855a 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxintegration.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxintegration.cpp
@@ -47,7 +47,7 @@
#include "wayland-xcomposite-client-protocol.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandGLIntegration * QWaylandGLIntegration::createGLIntegration(QWaylandDisplay *waylandDisplay)
{
@@ -136,3 +136,4 @@ void QWaylandXCompositeGLXIntegration::rootInformation(void *data, wl_xcomposite
integration->mScreen = XDefaultScreen(integration->mDisplay);
}
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxwindow.cpp b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxwindow.cpp
index c142a3639..3a64961f1 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxwindow.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxwindow.cpp
@@ -49,7 +49,7 @@
#include <X11/extensions/Xcomposite.h>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandXCompositeGLXWindow::QWaylandXCompositeGLXWindow(QWindow *window, QWaylandXCompositeGLXIntegration *glxIntegration)
: QWaylandWindow(window)
@@ -120,3 +120,5 @@ void QWaylandXCompositeGLXWindow::createSurface()
size);
attach(m_buffer, 0, 0);
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandclipboard.cpp b/src/plugins/platforms/wayland_common/qwaylandclipboard.cpp
index 31fe60455..4cf055d30 100644
--- a/src/plugins/platforms/wayland_common/qwaylandclipboard.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandclipboard.cpp
@@ -46,7 +46,7 @@
#include "qwaylanddatasource.h"
#include "qwaylanddatadevicemanager.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandClipboard::QWaylandClipboard(QWaylandDisplay *display)
: mDisplay(display)
@@ -82,3 +82,4 @@ bool QWaylandClipboard::supportsMode(QClipboard::Mode mode) const
return mode == QClipboard::Clipboard;
}
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandcursor.cpp b/src/plugins/platforms/wayland_common/qwaylandcursor.cpp
index 5210948bf..e0abba304 100644
--- a/src/plugins/platforms/wayland_common/qwaylandcursor.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandcursor.cpp
@@ -51,7 +51,7 @@
#include <wayland-cursor.h>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandCursor::QWaylandCursor(QWaylandScreen *screen)
: mDisplay(screen->display())
@@ -293,3 +293,5 @@ void QWaylandCursor::initCursorMap()
mCursorNamesMap.insert(ResizeSouthWestCursor, "sw-resize");
mCursorNamesMap.insert(ResizeSouthWestCursor, "bottom_left_corner");
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandcursor.h b/src/plugins/platforms/wayland_common/qwaylandcursor.h
index 334d2e8aa..ceb6d7488 100644
--- a/src/plugins/platforms/wayland_common/qwaylandcursor.h
+++ b/src/plugins/platforms/wayland_common/qwaylandcursor.h
@@ -45,11 +45,14 @@
#include <qpa/qplatformcursor.h>
#include <QMap>
+struct wl_cursor;
+struct wl_cursor_image;
+struct wl_cursor_theme;
+
QT_BEGIN_NAMESPACE
class QWaylandDisplay;
class QWaylandScreen;
-struct wl_cursor_theme;
class QWaylandCursor : public QPlatformCursor
{
diff --git a/src/plugins/platforms/wayland_common/qwaylanddatadevicemanager.cpp b/src/plugins/platforms/wayland_common/qwaylanddatadevicemanager.cpp
index 901069c5c..b021adc91 100644
--- a/src/plugins/platforms/wayland_common/qwaylanddatadevicemanager.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylanddatadevicemanager.cpp
@@ -58,7 +58,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
void QWaylandDataDeviceManager::data_offer(void *data,
struct wl_data_device *data_device,
@@ -322,4 +322,4 @@ struct wl_data_device_manager *QWaylandDataDeviceManager::handle() const
return m_data_device_manager;
}
-
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylanddataoffer.cpp b/src/plugins/platforms/wayland_common/qwaylanddataoffer.cpp
index d2080ea55..d98cfc2ab 100644
--- a/src/plugins/platforms/wayland_common/qwaylanddataoffer.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylanddataoffer.cpp
@@ -47,7 +47,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
void QWaylandDataOffer::offer_sync_callback(void *data,
struct wl_callback *callback,
@@ -143,3 +143,5 @@ struct wl_data_offer *QWaylandDataOffer::handle() const
{
return m_data_offer;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylanddataoffer.h b/src/plugins/platforms/wayland_common/qwaylanddataoffer.h
index fada683a2..abc7c690a 100644
--- a/src/plugins/platforms/wayland_common/qwaylanddataoffer.h
+++ b/src/plugins/platforms/wayland_common/qwaylanddataoffer.h
@@ -52,6 +52,9 @@
#include <stdint.h>
struct wl_callback;
+struct wl_callback_listener;
+struct wl_data_offer;
+struct wl_data_offer_listener;
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylanddatasource.cpp b/src/plugins/platforms/wayland_common/qwaylanddatasource.cpp
index ad280b03c..7bf8b0c96 100644
--- a/src/plugins/platforms/wayland_common/qwaylanddatasource.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylanddatasource.cpp
@@ -50,7 +50,7 @@
#include <unistd.h>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
void QWaylandDataSource::data_source_target(void *data,
struct wl_data_source *wl_data_source,
@@ -117,3 +117,5 @@ struct wl_data_source *QWaylandDataSource::handle() const
{
return m_data_source;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylanddecoration.cpp b/src/plugins/platforms/wayland_common/qwaylanddecoration.cpp
index 70d6c0e96..2949949de 100644
--- a/src/plugins/platforms/wayland_common/qwaylanddecoration.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylanddecoration.cpp
@@ -53,7 +53,7 @@
#include <QtGui/QPalette>
#include <QtGui/QLinearGradient>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
#define BUTTON_SPACING 5
@@ -468,3 +468,5 @@ void QWaylandDecoration::setBackgroundColor(const QColor &c)
{
m_backgroundColor = c;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp b/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp
index c06fd3365..4586ff8ce 100644
--- a/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylanddisplay.cpp
@@ -66,7 +66,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
struct wl_surface *QWaylandDisplay::createSurface(void *handle)
{
@@ -258,3 +258,4 @@ void QWaylandDisplay::forceRoundTrip()
wl_display_roundtrip(mDisplay);
}
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylanddisplay.h b/src/plugins/platforms/wayland_common/qwaylanddisplay.h
index 111271ffe..6b2cc89d6 100644
--- a/src/plugins/platforms/wayland_common/qwaylanddisplay.h
+++ b/src/plugins/platforms/wayland_common/qwaylanddisplay.h
@@ -50,6 +50,8 @@
#include <wayland-client.h>
#include <qwayland-wayland.h>
+struct wl_cursor_image;
+
QT_BEGIN_NAMESPACE
class QAbstractEventDispatcher;
diff --git a/src/plugins/platforms/wayland_common/qwaylanddnd.cpp b/src/plugins/platforms/wayland_common/qwaylanddnd.cpp
index 790fbbd09..0dc80e636 100644
--- a/src/plugins/platforms/wayland_common/qwaylanddnd.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylanddnd.cpp
@@ -43,7 +43,7 @@
#include "qwaylanddatadevicemanager.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandDrag::QWaylandDrag(QWaylandDisplay *display)
: m_display(display)
@@ -93,3 +93,5 @@ Qt::DropAction QWaylandDrag::executedDropAction() const
{
return Qt::CopyAction;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandeventthread.cpp b/src/plugins/platforms/wayland_common/qwaylandeventthread.cpp
index 5c0a1d5b2..17fa7445c 100644
--- a/src/plugins/platforms/wayland_common/qwaylandeventthread.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandeventthread.cpp
@@ -6,6 +6,8 @@
#include <stdio.h>
#include <errno.h>
+QT_BEGIN_NAMESPACE
+
QWaylandEventThread::QWaylandEventThread(QObject *parent)
: QObject(parent)
, m_display(0)
@@ -53,3 +55,5 @@ wl_display *QWaylandEventThread::display() const
QMutexLocker displayLock(m_displayLock);
return m_display;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandeventthread.h b/src/plugins/platforms/wayland_common/qwaylandeventthread.h
index bedf4ea51..f4aec744c 100644
--- a/src/plugins/platforms/wayland_common/qwaylandeventthread.h
+++ b/src/plugins/platforms/wayland_common/qwaylandeventthread.h
@@ -5,6 +5,8 @@
#include <QMutex>
#include <wayland-client.h>
+QT_BEGIN_NAMESPACE
+
class QSocketNotifier;
class QWaylandEventThread : public QObject
@@ -37,4 +39,6 @@ private:
};
+QT_END_NAMESPACE
+
#endif // QWAYLANDEVENTTHREAD_H
diff --git a/src/plugins/platforms/wayland_common/qwaylandextendedoutput.cpp b/src/plugins/platforms/wayland_common/qwaylandextendedoutput.cpp
index 24b264e28..d7c684be9 100644
--- a/src/plugins/platforms/wayland_common/qwaylandextendedoutput.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandextendedoutput.cpp
@@ -47,7 +47,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandExtendedOutput::QWaylandExtendedOutput(QWaylandScreen *screen, ::qt_extended_output *extended_output)
: QtWayland::qt_extended_output(extended_output)
@@ -96,3 +96,5 @@ void QWaylandExtendedOutput::extended_output_set_screen_rotation(int32_t rotatio
}
QWindowSystemInterface::handleScreenOrientationChange(m_screen->screen(), m_orientation);
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandextendedsurface.cpp b/src/plugins/platforms/wayland_common/qwaylandextendedsurface.cpp
index daf330265..4e13fbb1c 100644
--- a/src/plugins/platforms/wayland_common/qwaylandextendedsurface.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandextendedsurface.cpp
@@ -53,7 +53,7 @@
#include <qpa/qplatformnativeinterface.h>
#include <qpa/qwindowsysteminterface.h>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandExtendedSurface::QWaylandExtendedSurface(QWaylandWindow *window, struct ::qt_extended_surface *extended_surface)
: QtWayland::qt_extended_surface(extended_surface)
@@ -152,3 +152,5 @@ Qt::WindowFlags QWaylandExtendedSurface::setWindowFlags(Qt::WindowFlags flags)
return flags & (Qt::WindowStaysOnTopHint | Qt::WindowOverridesSystemGestures);
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandglintegration.cpp b/src/plugins/platforms/wayland_common/qwaylandglintegration.cpp
index a4b3331c6..bafb99443 100644
--- a/src/plugins/platforms/wayland_common/qwaylandglintegration.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandglintegration.cpp
@@ -41,7 +41,7 @@
#include "qwaylandglintegration.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandGLIntegration::QWaylandGLIntegration()
{
@@ -52,3 +52,5 @@ QWaylandGLIntegration::~QWaylandGLIntegration()
{
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland_common/qwaylandinputdevice.cpp
index fcdda71ee..4c965dd44 100644
--- a/src/plugins/platforms/wayland_common/qwaylandinputdevice.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandinputdevice.cpp
@@ -65,7 +65,7 @@
#include <X11/keysym.h>
#endif
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, uint32_t id)
: QtWayland::wl_seat(display->wl_registry(), id)
@@ -659,3 +659,5 @@ void QWaylandInputDevice::touch_frame()
mPrevTouchPoints.clear();
}
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandintegration.cpp b/src/plugins/platforms/wayland_common/qwaylandintegration.cpp
index f541d49b0..a4ddbc9d3 100644
--- a/src/plugins/platforms/wayland_common/qwaylandintegration.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandintegration.cpp
@@ -69,7 +69,7 @@
#endif
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandIntegration::QWaylandIntegration()
: mFontDb(new QGenericUnixFontDatabase())
@@ -212,3 +212,5 @@ QPlatformTheme *QWaylandIntegration::createPlatformTheme(const QString &name) co
{
return QGenericUnixTheme::createUnixTheme(name);
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandnativeinterface.cpp b/src/plugins/platforms/wayland_common/qwaylandnativeinterface.cpp
index 56afaa24b..354e8dbaa 100644
--- a/src/plugins/platforms/wayland_common/qwaylandnativeinterface.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandnativeinterface.cpp
@@ -49,7 +49,7 @@
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/QScreen>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandNativeInterface::QWaylandNativeInterface(QWaylandIntegration *integration)
: m_integration(integration)
@@ -130,3 +130,5 @@ void QWaylandNativeInterface::emitWindowPropertyChanged(QPlatformWindow *window,
{
emit windowPropertyChanged(window,name);
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandqtkey.cpp b/src/plugins/platforms/wayland_common/qwaylandqtkey.cpp
index 774d24b63..e723078cd 100644
--- a/src/plugins/platforms/wayland_common/qwaylandqtkey.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandqtkey.cpp
@@ -42,7 +42,7 @@
#include "qwaylandqtkey.h"
#include "qwaylandinputdevice.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandQtKeyExtension::QWaylandQtKeyExtension(QWaylandDisplay *display, uint32_t id)
: QtWayland::qt_key_extension(display->wl_registry(), id)
@@ -80,3 +80,5 @@ void QWaylandQtKeyExtension::key_extension_qtkey(uint32_t time,
nativeScanCode, nativeVirtualKey, nativeModifiers, text,
autorep, count);
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandscreen.cpp b/src/plugins/platforms/wayland_common/qwaylandscreen.cpp
index 714c90442..ce2cd1144 100644
--- a/src/plugins/platforms/wayland_common/qwaylandscreen.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandscreen.cpp
@@ -47,7 +47,7 @@
#include <qpa/qwindowsysteminterface.h>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, uint32_t id)
: QtWayland::wl_output(waylandDisplay->wl_registry(), id)
@@ -168,3 +168,5 @@ void QWaylandScreen::output_geometry(int32_t x, int32_t y,
QWindowSystemInterface::handleScreenGeometryChange(screen(), mGeometry);
QWindowSystemInterface::handleScreenAvailableGeometryChange(screen(), mGeometry);
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandshellsurface.cpp b/src/plugins/platforms/wayland_common/qwaylandshellsurface.cpp
index 1dddb50c2..32a62b3cb 100644
--- a/src/plugins/platforms/wayland_common/qwaylandshellsurface.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandshellsurface.cpp
@@ -49,7 +49,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandShellSurface::QWaylandShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window)
: QtWayland::wl_shell_surface(shell_surface)
@@ -153,3 +153,5 @@ void QWaylandShellSurface::shell_surface_configure(uint32_t edges,
void QWaylandShellSurface::shell_surface_popup_done()
{
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandshmbackingstore.cpp b/src/plugins/platforms/wayland_common/qwaylandshmbackingstore.cpp
index 9db3caa82..1c11bef4f 100644
--- a/src/plugins/platforms/wayland_common/qwaylandshmbackingstore.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandshmbackingstore.cpp
@@ -319,4 +319,3 @@ const struct wl_callback_listener QWaylandShmBackingStore::frameCallbackListener
};
QT_END_NAMESPACE
-
diff --git a/src/plugins/platforms/wayland_common/qwaylandshmwindow.cpp b/src/plugins/platforms/wayland_common/qwaylandshmwindow.cpp
index f4a0ede0c..48a1bfd53 100644
--- a/src/plugins/platforms/wayland_common/qwaylandshmwindow.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandshmwindow.cpp
@@ -47,7 +47,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandShmWindow::QWaylandShmWindow(QWindow *window)
: QWaylandWindow(window)
@@ -69,3 +69,5 @@ void QWaylandShmWindow::setBackingStore(QWaylandShmBackingStore *backingStore)
{
mBackingStore = backingStore;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandsubsurface.cpp b/src/plugins/platforms/wayland_common/qwaylandsubsurface.cpp
index 99713bb6b..0e9d575a9 100644
--- a/src/plugins/platforms/wayland_common/qwaylandsubsurface.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandsubsurface.cpp
@@ -45,7 +45,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandSubSurface::QWaylandSubSurface(QWaylandWindow *window, struct ::qt_sub_surface *sub_surface)
: QtWayland::qt_sub_surface(sub_surface)
@@ -87,3 +87,5 @@ void QWaylandSubSurface::adjustPositionOfChildren()
}
setPositionToParent(m_window);
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandtouch.cpp b/src/plugins/platforms/wayland_common/qwaylandtouch.cpp
index d241120ec..5835d9d3c 100644
--- a/src/plugins/platforms/wayland_common/qwaylandtouch.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandtouch.cpp
@@ -42,7 +42,7 @@
#include "qwaylandtouch.h"
#include "qwaylandinputdevice.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandTouchExtension::QWaylandTouchExtension(QWaylandDisplay *display, uint32_t id)
: QtWayland::qt_touch_extension(display->wl_registry(), id),
@@ -205,3 +205,5 @@ void QWaylandTouchExtension::touch_extension_configure(uint32_t flags)
{
mFlags = flags;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandwindow.cpp b/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
index 0ce2ad21c..1d62eaa1d 100644
--- a/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
@@ -59,7 +59,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandWindow::QWaylandWindow(QWindow *window)
: QObject()
@@ -484,3 +484,5 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
mWindowDecoration->handleMouse(inputDevice,local,global,b,mods);
}
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/wayland_common/qwaylandwindowmanagerintegration.cpp b/src/plugins/platforms/wayland_common/qwaylandwindowmanagerintegration.cpp
index dde867b25..5fc7dcb92 100644
--- a/src/plugins/platforms/wayland_common/qwaylandwindowmanagerintegration.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandwindowmanagerintegration.cpp
@@ -54,7 +54,7 @@
#include <QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
class QWaylandWindowManagerIntegrationPrivate {
public:
@@ -134,3 +134,5 @@ bool QWaylandWindowManagerIntegration::openDocument(const QUrl &url)
openUrl_helper(url);
return true;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcomposite_share/qwaylandxcompositebuffer.cpp b/src/plugins/platforms/xcomposite_share/qwaylandxcompositebuffer.cpp
index 3e18eaefb..c65ad4a1a 100644
--- a/src/plugins/platforms/xcomposite_share/qwaylandxcompositebuffer.cpp
+++ b/src/plugins/platforms/xcomposite_share/qwaylandxcompositebuffer.cpp
@@ -44,7 +44,7 @@
#include "wayland-client.h"
#include "wayland-xcomposite-client-protocol.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QWaylandXCompositeBuffer::QWaylandXCompositeBuffer(qt_xcomposite *xcomposite, uint32_t window, const QSize &size)
:mSize(size)
@@ -59,3 +59,5 @@ QSize QWaylandXCompositeBuffer::size() const
{
return mSize;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/waylandcompositors/brcm-egl/brcmbuffer.cpp b/src/plugins/waylandcompositors/brcm-egl/brcmbuffer.cpp
index 7f5c3893a..7cb7bdacf 100644
--- a/src/plugins/waylandcompositors/brcm-egl/brcmbuffer.cpp
+++ b/src/plugins/waylandcompositors/brcm-egl/brcmbuffer.cpp
@@ -45,7 +45,7 @@
#define EGL_EGLEXT_PROTOTYPES
#include <EGL/eglext_brcm.h>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
BrcmBuffer::BrcmBuffer(QtWayland::Compositor *compositor, const QSize &size, EGLint *data, size_t count)
: m_invertedY(false)
@@ -79,3 +79,5 @@ void BrcmBuffer::delete_resource(struct wl_resource *resource)
{
delete reinterpret_cast<BrcmBuffer *>(resource);
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/waylandcompositors/brcm-egl/brcmeglintegration.cpp b/src/plugins/waylandcompositors/brcm-egl/brcmeglintegration.cpp
index 531bdc415..717b5cf3e 100644
--- a/src/plugins/waylandcompositors/brcm-egl/brcmeglintegration.cpp
+++ b/src/plugins/waylandcompositors/brcm-egl/brcmeglintegration.cpp
@@ -60,7 +60,7 @@
#include "wayland-brcm-server-protocol.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
class BrcmEglIntegrationPrivate
{
@@ -193,3 +193,5 @@ bool BrcmEglIntegration::isYInverted(struct wl_buffer *buffer) const
Q_UNUSED(buffer);
return false;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp b/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp
index 334d18e4d..f77bdc2c0 100644
--- a/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp
+++ b/src/plugins/waylandcompositors/wayland-egl/waylandeglintegration.cpp
@@ -72,7 +72,7 @@ typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target,
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
#endif
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
class WaylandEglIntegrationPrivate
{
@@ -233,3 +233,4 @@ void WaylandEglIntegration::unlockNativeBuffer(void *native_buffer, QOpenGLConte
d->egl_destroy_image(d->egl_display, image);
}
+QT_END_NAMESPACE
diff --git a/src/plugins/waylandcompositors/xcomposite-egl/xcompositeeglintegration.cpp b/src/plugins/waylandcompositors/xcomposite-egl/xcompositeeglintegration.cpp
index 72f2fbc2f..2896d7a9d 100644
--- a/src/plugins/waylandcompositors/xcomposite-egl/xcompositeeglintegration.cpp
+++ b/src/plugins/waylandcompositors/xcomposite-egl/xcompositeeglintegration.cpp
@@ -54,7 +54,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QVector<EGLint> eglbuildSpec()
{
@@ -140,3 +140,5 @@ bool XCompositeEglIntegration::isYInverted(wl_buffer *buffer) const
XCompositeBuffer *compositorBuffer = static_cast<XCompositeBuffer *>(buffer);
return compositorBuffer->isYInverted();
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/waylandcompositors/xcomposite-glx/xcompositeglxintegration.cpp b/src/plugins/waylandcompositors/xcomposite-glx/xcompositeglxintegration.cpp
index 41d291203..f716a71a5 100644
--- a/src/plugins/waylandcompositors/xcomposite-glx/xcompositeglxintegration.cpp
+++ b/src/plugins/waylandcompositors/xcomposite-glx/xcompositeglxintegration.cpp
@@ -54,7 +54,7 @@
#include <QtCore/QDebug>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QVector<int> qglx_buildSpec()
{
@@ -150,3 +150,5 @@ bool XCompositeGLXIntegration::isYInverted(wl_buffer *buffer) const
{
return static_cast<XCompositeBuffer *>(buffer)->isYInverted();
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/waylandcompositors/xcomposite_share/xcompositebuffer.cpp b/src/plugins/waylandcompositors/xcomposite_share/xcompositebuffer.cpp
index d7196b796..f19c715c6 100644
--- a/src/plugins/waylandcompositors/xcomposite_share/xcompositebuffer.cpp
+++ b/src/plugins/waylandcompositors/xcomposite_share/xcompositebuffer.cpp
@@ -40,7 +40,7 @@
#include "xcompositebuffer.h"
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
XCompositeBuffer::XCompositeBuffer(Window window, const QSize &size,
struct ::wl_client *client, uint32_t id)
@@ -78,3 +78,5 @@ Window XCompositeBuffer::window()
{
return mWindow;
}
+
+QT_END_NAMESPACE
diff --git a/src/plugins/waylandcompositors/xcomposite_share/xcompositehandler.cpp b/src/plugins/waylandcompositors/xcomposite_share/xcompositehandler.cpp
index 10a760750..0f10d38de 100644
--- a/src/plugins/waylandcompositors/xcomposite_share/xcompositehandler.cpp
+++ b/src/plugins/waylandcompositors/xcomposite_share/xcompositehandler.cpp
@@ -45,7 +45,7 @@
#include "xcompositebuffer.h"
#include <X11/extensions/Xcomposite.h>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
XCompositeHandler::XCompositeHandler(QtWayland::Compositor *compositor, Display *display)
: QtWaylandServer::qt_xcomposite(compositor->wl_display())
@@ -74,3 +74,5 @@ void XCompositeHandler::xcomposite_create_buffer(Resource *resource, uint32_t id
{
new XCompositeBuffer(Window(window), QSize(width, height), resource->client(), id);
}
+
+QT_END_NAMESPACE
diff --git a/src/shared/qwaylandmimehelper.cpp b/src/shared/qwaylandmimehelper.cpp
index d7e511440..94a107c81 100644
--- a/src/shared/qwaylandmimehelper.cpp
+++ b/src/shared/qwaylandmimehelper.cpp
@@ -46,7 +46,7 @@
#include <QBuffer>
#include <QImageWriter>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
QByteArray QWaylandMimeHelper::getByteArray(QMimeData *mimeData, const QString &mimeType)
{
@@ -83,3 +83,5 @@ QByteArray QWaylandMimeHelper::getByteArray(QMimeData *mimeData, const QString &
}
return content;
}
+
+QT_END_NAMESPACE