summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
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 /src/plugins/platforms
parent6b173d993542e2aed01b5a97d3e0fb64940ad432 (diff)
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>
Diffstat (limited to 'src/plugins/platforms')
-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
6 files changed, 20 insertions, 63 deletions
diff --git a/src/plugins/platforms/qwayland-brcm-egl/main.cpp b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
index c8c4eef12..bd167f618 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 6f790a14a..010a23e25 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 0575d0dc2..e1761d8e8 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 b065a4659..d3f5a0b54 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 8ccd5b46b..03dac08bb 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 2f43b467b..fb2b1414e 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