summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorgen Lind <jorgen.lind@digia.com>2014-03-10 14:31:55 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-11 15:35:18 +0100
commit043a2893c41bbe0daa8953e9e30dd6957f216d95 (patch)
tree605fef066399c3678a34d6d442a20281d1c3bcd1
parent6b173d993542e2aed01b5a97d3e0fb64940ad432 (diff)
downloadqtwayland-043a2893c41bbe0daa8953e9e30dd6957f216d95.tar.gz
qtwayland-043a2893c41bbe0daa8953e9e30dd6957f216d95.tar.bz2
qtwayland-043a2893c41bbe0daa8953e9e30dd6957f216d95.zip
Take advantage of the Qt 5 plugin json structure
Also change naming scheme of plugins: buffer integrations doesn't start with "wayland-" but the platform plugins have to start with "wayland-". Also update the README Change-Id: I6dd2103ab287ed569ab06cfb6eb469e3db058831 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
-rw-r--r--README23
-rw-r--r--src/plugins/hardwareintegration/client/brcm-egl/brcm-egl.json2
-rw-r--r--src/plugins/hardwareintegration/client/brcm-egl/main.cpp18
-rw-r--r--src/plugins/hardwareintegration/client/drm-egl-server/main.cpp18
-rw-r--r--src/plugins/hardwareintegration/client/wayland-egl/main.cpp18
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp18
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.json2
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp18
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.json2
-rw-r--r--src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.json2
-rw-r--r--src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp16
-rw-r--r--src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp16
-rw-r--r--src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp16
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp16
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.json2
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp16
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.json2
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/main.cpp11
-rw-r--r--src/plugins/platforms/qwayland-egl/main.cpp18
-rw-r--r--src/plugins/platforms/qwayland-generic/main.cpp18
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/main.cpp18
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.json2
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/main.cpp16
23 files changed, 84 insertions, 204 deletions
diff --git a/README b/README
index 9dd5a387..368ecbc3 100644
--- a/README
+++ b/README
@@ -19,6 +19,29 @@ To build the QtWayland module you need the external dependencies:
xkbcommon 0.2.0 - http://xkbcommon.org/
wayland 1.2.0 - http://wayland.freedesktop.org/
+QtCompositor supports loading client buffer integrations that don't use the
+wayland-egl interfaces. These client buffer integrations are picked up by
+QtCompositor as plugins. To specify what plugin to load use the environment
+variable QT_WAYLAND_CLIENT_BUFFER_INTEGRATION in the environment where the
+compositor is started. The compositor will broadcast to the clients which
+hardware integration to load when using the generic platformplugin "wayland". If
+no client buffer integration is specifided, then the wayland-egl plugin will be
+loaded. Please note that no Weston clients will work if the non standard
+wayland-egl client buffer integration is used.
+
+To start the qwindow-compositor with the xcomposite-egl integration then start
+the compositor as follows:
+QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=xcomposite-egl ./qwindow-compositor
+
+Now it should be possible to start an application in a separate terminal. ie:
+$QTBASEDIR/examples/opengl/hellowindow/hellowindow -platform wayland --single
+
+Available client buffer integrations are:
+wayland-egl (this is the default)
+brcm
+xcomposite-egl
+xcomposite-glx
+
We hang out at #qt-labs and #qt-lighthouse on freenode if you have any questions
diff --git a/src/plugins/hardwareintegration/client/brcm-egl/brcm-egl.json b/src/plugins/hardwareintegration/client/brcm-egl/brcm-egl.json
index 48611c6a..3a659a87 100644
--- a/src/plugins/hardwareintegration/client/brcm-egl/brcm-egl.json
+++ b/src/plugins/hardwareintegration/client/brcm-egl/brcm-egl.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "wayland-brcm" ]
+ "Keys": [ "brcm" ]
}
diff --git a/src/plugins/hardwareintegration/client/brcm-egl/main.cpp b/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
index f77b41ef..c023332e 100644
--- a/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
@@ -47,26 +47,16 @@ QT_BEGIN_NAMESPACE
class QWaylandBrcmEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3" FILE "brcm-egl.json")
+ Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "brcm-egl.json")
public:
- QStringList keys() const;
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
+ QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList QWaylandBrcmEglClientBufferPlugin::keys() const
-{
- QStringList list;
- list << "wayland-brcm";
- return list;
-}
-
QWaylandClientBufferIntegration *QWaylandBrcmEglClientBufferPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-brcm")
- return new QWaylandBrcmEglIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new QWaylandBrcmEglIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
index 33b8b4b2..6a3df443 100644
--- a/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
@@ -47,26 +47,16 @@ QT_BEGIN_NAMESPACE
class DrmEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandServerBufferIntegrationFactoryInterface.5.3" FILE "drm-egl-server.json")
+ Q_PLUGIN_METADATA(IID QWaylandServerBufferIntegrationFactoryInterface_iid FILE "drm-egl-server.json")
public:
- QStringList keys() const;
- QWaylandServerBufferIntegration *create(const QString&, const QStringList&);
+ QWaylandServerBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList DrmEglServerBufferPlugin::keys() const
-{
- QStringList list;
- list << "drm-egl-server";
- return list;
-}
-
QWaylandServerBufferIntegration *DrmEglServerBufferPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "drm-egl-server")
- return new DrmEglServerBufferIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new DrmEglServerBufferIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/hardwareintegration/client/wayland-egl/main.cpp b/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
index 50e95664..e4cd8c1f 100644
--- a/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
@@ -47,26 +47,16 @@ QT_BEGIN_NAMESPACE
class QWaylandEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3" FILE "wayland-egl.json")
+ Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "wayland-egl.json")
public:
- QStringList keys() const;
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
+ QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList QWaylandEglClientBufferPlugin::keys() const
-{
- QStringList list;
- list << "wayland-egl";
- return list;
-}
-
QWaylandClientBufferIntegration *QWaylandEglClientBufferPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-egl")
- return new QWaylandEglClientBufferIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new QWaylandEglClientBufferIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp b/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
index 46e3eda4..4b9835f1 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
@@ -47,26 +47,16 @@ QT_BEGIN_NAMESPACE
class QWaylandXCompositeEglClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3" FILE "xcomposite-egl.json")
+ Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-egl.json")
public:
- QStringList keys() const;
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
+ QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList QWaylandXCompositeEglClientBufferIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "xcomposite" << "xcomposite-egl";
- return list;
-}
-
QWaylandClientBufferIntegration *QWaylandXCompositeEglClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "xcomposite" || system.toLower() == "xcomposite-egl")
- return new QWaylandXCompositeEGLClientBufferIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new QWaylandXCompositeEGLClientBufferIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.json b/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.json
index 8ccd5b46..0d119ff8 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.json
+++ b/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "wayland-xcomposite" ]
+ "Keys": [ "xcomposite-egl" ]
}
diff --git a/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp b/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
index 2d402194..2c6f0fde 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
+++ b/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
@@ -47,26 +47,16 @@ QT_BEGIN_NAMESPACE
class QWaylandXCompositeGlxClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3" FILE "xcomposite-glx.json")
+ Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-glx.json")
public:
- QStringList keys() const;
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
+ QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList QWaylandXCompositeGlxClientBufferIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "wayland-xcomposite-glx";
- return list;
-}
-
QWaylandClientBufferIntegration *QWaylandXCompositeGlxClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-xcomposite-glx")
- return new QWaylandXCompositeGLXIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new QWaylandXCompositeGLXIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.json b/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.json
index 0f4a3bf6..e2c4cecd 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.json
+++ b/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "wayland-xcomposite-glx" ]
+ "Keys": [ "xcomposite-glx" ]
}
diff --git a/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.json b/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.json
index 48611c6a..3a659a87 100644
--- a/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.json
+++ b/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "wayland-brcm" ]
+ "Keys": [ "brcm" ]
}
diff --git a/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp b/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
index 53a3f3c3..f6bb717b 100644
--- a/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
@@ -49,24 +49,14 @@ class QWaylandBrcmClientBufferIntegration : public QtWayland::ClientBufferIntegr
Q_OBJECT
Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "brcm-egl.json")
public:
- QStringList keys() const;
- QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&);
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList QWaylandBrcmClientBufferIntegration::keys() const
-{
- QStringList list;
- list << "wayland-brcm";
- return list;
-}
-
QtWayland::ClientBufferIntegration *QWaylandBrcmClientBufferIntegration::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-brcm")
- return new BrcmEglIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new BrcmEglIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp b/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
index 4bfc1b48..e85f9300 100644
--- a/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
@@ -49,24 +49,14 @@ class DrmEglServerBufferIntegrationPlugin : public QtWayland::ServerBufferIntegr
Q_OBJECT
Q_PLUGIN_METADATA(IID QtWaylandServerBufferIntegrationFactoryInterface_iid FILE "drm-egl-server.json")
public:
- QStringList keys() const;
- QtWayland::ServerBufferIntegration *create(const QString&, const QStringList&);
+ QtWayland::ServerBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList DrmEglServerBufferIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "drm-egl-server";
- return list;
-}
-
QtWayland::ServerBufferIntegration *DrmEglServerBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "drm-egl-server")
- return new DrmEglServerBufferIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new DrmEglServerBufferIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp b/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
index 274dff1e..3a7984f0 100644
--- a/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
@@ -50,24 +50,14 @@ class QWaylandIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugi
Q_OBJECT
Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "wayland-egl.json")
public:
- QStringList keys() const;
- QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&);
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList QWaylandIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "wayland-egl";
- return list;
-}
-
QtWayland::ClientBufferIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-egl")
- return new WaylandEglClientBufferIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new WaylandEglClientBufferIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp b/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
index 4ae206fa..f0bbedaa 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
@@ -49,24 +49,14 @@ class QWaylandXCompositeClientBufferIntegration : public QtWayland::ClientBuffer
Q_OBJECT
Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-egl.json")
public:
- QStringList keys() const;
- QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&);
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList QWaylandXCompositeClientBufferIntegration::keys() const
-{
- QStringList list;
- list << "wayland-xcomposite";
- return list;
-}
-
QtWayland::ClientBufferIntegration *QWaylandXCompositeClientBufferIntegration::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-xcomposite")
- return new XCompositeEglClientBufferIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new XCompositeEglClientBufferIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.json b/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.json
index 8ccd5b46..0d119ff8 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.json
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "wayland-xcomposite" ]
+ "Keys": [ "xcomposite-egl" ]
}
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp b/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
index 4dcd9136..37602bcc 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
@@ -49,24 +49,14 @@ class QWaylandXCompositeClientBufferIntegration : public QtWayland::ClientBuffer
Q_OBJECT
Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-glx.json")
public:
- QStringList keys() const;
- QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&);
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList QWaylandXCompositeClientBufferIntegration::keys() const
-{
- QStringList list;
- list << "wayland-xcomposite-glx";
- return list;
-}
-
QtWayland::ClientBufferIntegration *QWaylandXCompositeClientBufferIntegration::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-xcomposite-glx")
- return new XCompositeGLXClientBufferIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new XCompositeGLXClientBufferIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.json b/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.json
index 0f4a3bf6..e2c4cecd 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.json
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "wayland-xcomposite-glx" ]
+ "Keys": [ "xcomposite-glx" ]
}
diff --git a/src/plugins/platforms/qwayland-brcm-egl/main.cpp b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
index c8c4eef1..bd167f61 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
@@ -47,10 +47,9 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-brcm-egl.json")
+ Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "qwayland-brcm-egl.json")
public:
- QStringList keys() const;
- QPlatformIntegration *create(const QString&, const QStringList&);
+ QPlatformIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
QStringList QWaylandIntegrationPlugin::keys() const
@@ -63,10 +62,8 @@ QStringList QWaylandIntegrationPlugin::keys() const
QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-brcm")
- return new QWaylandBrcmEglPlatformIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new QWaylandBrcmEglPlatformIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-egl/main.cpp b/src/plugins/platforms/qwayland-egl/main.cpp
index 6f790a14..010a23e2 100644
--- a/src/plugins/platforms/qwayland-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-egl/main.cpp
@@ -47,26 +47,16 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-egl.json")
+ Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "qwayland-egl.json")
public:
- QStringList keys() const;
- QPlatformIntegration *create(const QString&, const QStringList&);
+ QPlatformIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList QWaylandIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "wayland-egl";
- return list;
-}
-
QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-egl")
- return new QWaylandEglPlatformIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new QWaylandEglPlatformIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-generic/main.cpp b/src/plugins/platforms/qwayland-generic/main.cpp
index 0575d0dc..e1761d8e 100644
--- a/src/plugins/platforms/qwayland-generic/main.cpp
+++ b/src/plugins/platforms/qwayland-generic/main.cpp
@@ -47,26 +47,16 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-generic.json")
+ Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "qwayland-generic.json")
public:
- QStringList keys() const;
- QPlatformIntegration *create(const QString&, const QStringList&);
+ QPlatformIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList QWaylandIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "wayland";
- return list;
-}
-
QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland")
- return new QWaylandIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new QWaylandIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
index b065a465..d3f5a0b5 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
@@ -47,26 +47,16 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-xcomposite-egl.json")
+ Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "qwayland-xcomposite-egl.json")
public:
- QStringList keys() const;
- QPlatformIntegration *create(const QString&, const QStringList&);
+ QPlatformIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
};
-QStringList QWaylandIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "wayland-xcomposite" << "wayland-xcomposite-egl";
- return list;
-}
-
QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-xcomposite" || system.toLower() == "wayland-xcomposite-egl")
- return new QWaylandXCompositeEglPlatformIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new QWaylandXCompositeEglPlatformIntegration();
}
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.json b/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.json
index 8ccd5b46..03dac08b 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.json
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "wayland-xcomposite" ]
+ "Keys": [ "wayland-xcomposite-egl" ]
}
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
index 2f43b467..fb2b1414 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
@@ -49,26 +49,16 @@ QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-xcomposite-glx.json")
+ Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "qwayland-xcomposite-glx.json")
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
-QStringList QWaylandIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "wayland-xcomposite-glx";
- return list;
-}
-
QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-xcomposite-glx")
- return new QWaylandXCompositeGlxPlatformIntegration();
-
- return 0;
+ Q_UNUSED(system);
+ return new QWaylandXCompositeGlxPlatformIntegration();
}
QT_END_NAMESPACE