Fix naming of plugins for QPA plugins and use new plugin system.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Thu, 16 Feb 2012 14:30:37 +0000 (15:30 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 17 Feb 2012 07:23:02 +0000 (08:23 +0100)
- Fix naming "com.nokia" -> "org.qt-project" in platform
  integration & platform theme.
- Adapt Windows, XCB, Cocoa, Minimal.

Change-Id: I7834f5c3d94473b6f06c1bffee074a70ee25f426
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
14 files changed:
src/gui/kernel/qplatformintegrationplugin_qpa.h
src/gui/kernel/qplatformthemeplugin_qpa.h
src/plugins/platforms/cocoa/cocoa.json [new file with mode: 0644]
src/plugins/platforms/cocoa/cocoa.pro
src/plugins/platforms/cocoa/main.mm
src/plugins/platforms/minimal/main.cpp
src/plugins/platforms/minimal/minimal.json [new file with mode: 0644]
src/plugins/platforms/minimal/minimal.pro
src/plugins/platforms/windows/main.cpp
src/plugins/platforms/windows/windows.json [new file with mode: 0644]
src/plugins/platforms/windows/windows.pro
src/plugins/platforms/xcb/main.cpp
src/plugins/platforms/xcb/xcb.json [new file with mode: 0644]
src/plugins/platforms/xcb/xcb.pro

index 84c2567..d70569c 100644 (file)
@@ -68,7 +68,7 @@ struct QPlatformIntegrationFactoryInterface : public QFactoryInterface
     virtual QPlatformIntegration *create(const QString &key, const QStringList &paramList) = 0;
 };
 
-#define QPlatformIntegrationFactoryInterface_iid "com.nokia.Qt.QPlatformIntegrationFactoryInterface"
+#define QPlatformIntegrationFactoryInterface_iid "org.qt-project.Qt.QPlatformIntegrationFactoryInterface"
 
 Q_DECLARE_INTERFACE(QPlatformIntegrationFactoryInterface, QPlatformIntegrationFactoryInterface_iid)
 
index fb4f9f9..3ce7cc5 100644 (file)
@@ -68,7 +68,7 @@ struct QPlatformThemeFactoryInterface : public QFactoryInterface
     virtual QPlatformTheme *create(const QString &key, const QStringList &paramList) = 0;
 };
 
-#define QPlatformThemeFactoryInterface_iid "com.nokia.Qt.QPlatformThemeFactoryInterface"
+#define QPlatformThemeFactoryInterface_iid "org.qt-project.Qt.QPlatformThemeFactoryInterface"
 
 Q_DECLARE_INTERFACE(QPlatformThemeFactoryInterface, QPlatformThemeFactoryInterface_iid)
 
diff --git a/src/plugins/platforms/cocoa/cocoa.json b/src/plugins/platforms/cocoa/cocoa.json
new file mode 100644 (file)
index 0000000..520c4f5
--- /dev/null
@@ -0,0 +1,3 @@
+{
+    "Keys": [ "cocoa" ]
+}
index 1e803a1..45dd352 100644 (file)
@@ -59,6 +59,7 @@ LIBS += -framework Cocoa
 
 QT += core-private gui-private widgets-private platformsupport-private
 
+OTHER_FILES += cocoa.json
 target.path += $$[QT_INSTALL_PLUGINS]/platforms
 INSTALLS += target
 
index 334a1fe..9857a4e 100644 (file)
@@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE
 
 class QCocoaIntegrationPlugin : public QPlatformIntegrationPlugin
 {
+    Q_OBJECT
+    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "cocoa.json")
 public:
     QStringList keys() const;
     QPlatformIntegration *create(const QString&, const QStringList&);
@@ -71,6 +73,6 @@ QPlatformIntegration * QCocoaIntegrationPlugin::create(const QString& system, co
     return 0;
 }
 
-Q_EXPORT_PLUGIN2(CocoaIntegration, QCocoaIntegrationPlugin)
-
 QT_END_NAMESPACE
+
+#include "main.moc"
index 4d3b3a1..8a6e8fb 100644 (file)
@@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE
 
 class QMinimalIntegrationPlugin : public QPlatformIntegrationPlugin
 {
+    Q_OBJECT
+    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "minimal.json")
 public:
     QStringList keys() const;
     QPlatformIntegration *create(const QString&, const QStringList&);
@@ -68,6 +70,6 @@ QPlatformIntegration *QMinimalIntegrationPlugin::create(const QString& system, c
     return 0;
 }
 
-Q_EXPORT_PLUGIN2(minimal, QMinimalIntegrationPlugin)
-
 QT_END_NAMESPACE
+
+#include "main.moc"
diff --git a/src/plugins/platforms/minimal/minimal.json b/src/plugins/platforms/minimal/minimal.json
new file mode 100644 (file)
index 0000000..d3cf684
--- /dev/null
@@ -0,0 +1,3 @@
+{
+    "Keys": [ "minimal" ]
+}
index 392d12d..6430ccd 100644 (file)
@@ -10,5 +10,7 @@ SOURCES =   main.cpp \
 HEADERS =   qminimalintegration.h \
             qminimalbackingstore.h
 
+OTHER_FILES += minimal.json
+
 target.path += $$[QT_INSTALL_PLUGINS]/platforms
 INSTALLS += target
index d54a1db..f16eff5 100644 (file)
@@ -100,6 +100,8 @@ QT_BEGIN_NAMESPACE
 
 class QWindowsIntegrationPlugin : public QPlatformIntegrationPlugin
 {
+    Q_OBJECT
+    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "windows.json")
 public:
     QStringList keys() const;
     QPlatformIntegration *create(const QString&, const QStringList&);
@@ -118,6 +120,6 @@ QPlatformIntegration *QWindowsIntegrationPlugin::create(const QString& system, c
     return 0;
 }
 
-Q_EXPORT_PLUGIN2(windows, QWindowsIntegrationPlugin)
-
 QT_END_NAMESPACE
+
+#include "main.moc"
diff --git a/src/plugins/platforms/windows/windows.json b/src/plugins/platforms/windows/windows.json
new file mode 100644 (file)
index 0000000..05032c1
--- /dev/null
@@ -0,0 +1,3 @@
+{
+    "Keys": [ "windows" ]
+}
index 58a117b..bb41fe8 100644 (file)
@@ -149,5 +149,7 @@ contains(QT_CONFIG, freetype) {
    }
 }
 
+OTHER_FILES += windows.json
+
 target.path += $$[QT_INSTALL_PLUGINS]/platforms
 INSTALLS += target
index 5aa3e92..50c5a1a 100644 (file)
@@ -46,6 +46,8 @@ QT_BEGIN_NAMESPACE
 
 class QXcbIntegrationPlugin : public QPlatformIntegrationPlugin
 {
+   Q_OBJECT
+   Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "xcb.json")
 public:
     QStringList keys() const;
     QPlatformIntegration *create(const QString&, const QStringList&);
@@ -66,6 +68,6 @@ QPlatformIntegration* QXcbIntegrationPlugin::create(const QString& system, const
     return 0;
 }
 
-Q_EXPORT_PLUGIN2(xcb, QXcbIntegrationPlugin)
-
 QT_END_NAMESPACE
+
+#include "main.moc"
diff --git a/src/plugins/platforms/xcb/xcb.json b/src/plugins/platforms/xcb/xcb.json
new file mode 100644 (file)
index 0000000..dc09d7b
--- /dev/null
@@ -0,0 +1,3 @@
+{
+    "Keys": [ "xcb" ]
+}
index 50ca8bf..7bad2b4 100644 (file)
@@ -108,5 +108,7 @@ QT += dbus
 LIBS += -ldbus-1
 }
 
+OTHER_FILES += xcb.json
+
 target.path += $$[QT_INSTALL_PLUGINS]/platforms
 INSTALLS += target