From c343f710f4d59643ab6b6d200cff29edee482094 Mon Sep 17 00:00:00 2001 From: Hannu Lyytinen Date: Tue, 10 Apr 2012 16:12:21 +0300 Subject: [PATCH] Use the new plugin system in the KMS plugin. Sync up the KMS QPA plugin with the plugin system changes. Change-Id: Ifaa8be6f11aeb93acc63643c62ca15db4e9bc38f Reviewed-by: Andy Nichols --- src/plugins/platforms/kms/kms.json | 3 +++ src/plugins/platforms/kms/kms.pro | 21 +++++++-------------- src/plugins/platforms/kms/main.cpp | 6 ++++-- 3 files changed, 14 insertions(+), 16 deletions(-) create mode 100644 src/plugins/platforms/kms/kms.json diff --git a/src/plugins/platforms/kms/kms.json b/src/plugins/platforms/kms/kms.json new file mode 100644 index 0000000000..be662226ae --- /dev/null +++ b/src/plugins/platforms/kms/kms.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "kms" ] +} diff --git a/src/plugins/platforms/kms/kms.pro b/src/plugins/platforms/kms/kms.pro index 73a3fa0418..5b91326a39 100644 --- a/src/plugins/platforms/kms/kms.pro +++ b/src/plugins/platforms/kms/kms.pro @@ -1,11 +1,12 @@ TARGET = qkms - load(qt_plugin) -QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms -QT = core-private gui-private platformsupport-private opengl-private +QT += core-private gui-private platformsupport-private opengl-private +DESTDIR = $$QT.gui.plugins/platforms -CONFIG += link_pkgconfig qpa/genericunixfontdatabase +DEFINES += MESA_EGL_NO_X11_HEADERS + +CONFIG += link_pkgconfig egl qpa/genericunixfontdatabase PKGCONFIG += libdrm egl gbm glesv2 @@ -30,13 +31,5 @@ HEADERS = qkmsintegration.h \ target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target - - - - - - - - - - +OTHER_FILES += \ + kms.json diff --git a/src/plugins/platforms/kms/main.cpp b/src/plugins/platforms/kms/main.cpp index d79d0d240f..422fc5fba6 100644 --- a/src/plugins/platforms/kms/main.cpp +++ b/src/plugins/platforms/kms/main.cpp @@ -46,6 +46,8 @@ QT_BEGIN_NAMESPACE class QKmsIntegrationPlugin : public QPlatformIntegrationPlugin { + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "kms.json") public: QStringList keys() const; QPlatformIntegration *create(const QString&, const QStringList&); @@ -67,6 +69,6 @@ QPlatformIntegration *QKmsIntegrationPlugin::create(const QString& system, const return 0; } -Q_EXPORT_PLUGIN2(kms, QKmsIntegrationPlugin) - QT_END_NAMESPACE + +#include "main.moc"