diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-01-29 14:35:44 +0200 |
---|---|---|
committer | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-01-29 12:53:04 +0000 |
commit | e6255beec9114afd1fad9e7d62ebec433a627d54 (patch) | |
tree | e03655b01f480e4e82686ad02318f241a21f0002 /src/client/hardwareintegration | |
parent | 1db1fa1619e718eebdc88899df6c0a8c6d2309b9 (diff) |
Namespace the platform plugins
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 <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/client/hardwareintegration')
14 files changed, 59 insertions, 3 deletions
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp index 2c4d8ff1b..f60993097 100644 --- a/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp +++ b/src/client/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/client/hardwareintegration/qwaylandclientbufferintegration_p.h b/src/client/hardwareintegration/qwaylandclientbufferintegration_p.h index 898ab2251..8c787175d 100644 --- a/src/client/hardwareintegration/qwaylandclientbufferintegration_p.h +++ b/src/client/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/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp index 7f2648bcf..d0603ef22 100644 --- a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp +++ b/src/client/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/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h index 4a1c41286..25ea5805e 100644 --- a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h +++ b/src/client/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/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp index afc105106..1b362b294 100644 --- a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp +++ b/src/client/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/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h index 7f96ebc6a..a14c17810 100644 --- a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h +++ b/src/client/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/client/hardwareintegration/qwaylandhardwareintegration.cpp b/src/client/hardwareintegration/qwaylandhardwareintegration.cpp index 469f80360..c02eebf3a 100644 --- a/src/client/hardwareintegration/qwaylandhardwareintegration.cpp +++ b/src/client/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/client/hardwareintegration/qwaylandhardwareintegration_p.h b/src/client/hardwareintegration/qwaylandhardwareintegration_p.h index 84aa18ace..503e69b03 100644 --- a/src/client/hardwareintegration/qwaylandhardwareintegration_p.h +++ b/src/client/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/client/hardwareintegration/qwaylandserverbufferintegration.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp index 5bac68929..07780f52e 100644 --- a/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp +++ b/src/client/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/client/hardwareintegration/qwaylandserverbufferintegration_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h index 18090a798..7732cea27 100644 --- a/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h +++ b/src/client/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/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp index 2b61dbdc8..3df77a003 100644 --- a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp +++ b/src/client/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/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h index 48e5e13d9..5fcce2ba6 100644 --- a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h +++ b/src/client/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/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp index 8fc31a883..e77bec0e7 100644 --- a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp +++ b/src/client/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/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h index d5d1d78f5..f74ee1ad1 100644 --- a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h +++ b/src/client/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 |