Adapt to _qpa file rename in qtbase.
[profile/ivi/qtwayland.git] / src / plugins / platforms / wayland / main.cpp
index ba365ca..61484ba 100644 (file)
@@ -1,8 +1,7 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
 **
 ** This file is part of the plugins of the Qt Toolkit.
 **
 **
 **
 **
+**
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
 
-#include <QtGui/QPlatformIntegrationPlugin>
+#include <qpa/qplatformintegrationplugin.h>
 #include "qwaylandintegration.h"
 
 QT_BEGIN_NAMESPACE
 
 class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
 {
+    Q_OBJECT
+    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "wayland.json")
 public:
     QStringList keys() const;
     QPlatformIntegration *create(const QString&, const QStringList&);
@@ -54,8 +56,7 @@ public:
 QStringList QWaylandIntegrationPlugin::keys() const
 {
     QStringList list;
-    list << "Wayland";
-    list << "WaylandGL";
+    list << "wayland";
     return list;
 }
 
@@ -63,13 +64,11 @@ QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, c
 {
     Q_UNUSED(paramList);
     if (system.toLower() == "wayland")
-        return new QWaylandIntegration;
-    if (system.toLower() == "waylandgl")
-        return new QWaylandIntegration(true);
+        return new QWaylandIntegration();
 
     return 0;
 }
 
-Q_EXPORT_PLUGIN2(wayland, QWaylandIntegrationPlugin)
-
 QT_END_NAMESPACE
+
+#include "main.moc"