Fix naming of plugins for QPA plugins and use new plugin system.

- 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>
This commit is contained in:
Friedemann Kleint 2012-02-16 15:30:37 +01:00 committed by Qt by Nokia
parent f0f78eb0a9
commit 7a8883c434
14 changed files with 37 additions and 10 deletions

View 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)

View 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)

View File

@ -0,0 +1,3 @@
{
"Keys": [ "cocoa" ]
}

View 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

View 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"

View 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"

View File

@ -0,0 +1,3 @@
{
"Keys": [ "minimal" ]
}

View 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

View 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"

View File

@ -0,0 +1,3 @@
{
"Keys": [ "windows" ]
}

View File

@ -149,5 +149,7 @@ contains(QT_CONFIG, freetype) {
}
}
OTHER_FILES += windows.json
target.path += $$[QT_INSTALL_PLUGINS]/platforms
INSTALLS += target

View 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"

View File

@ -0,0 +1,3 @@
{
"Keys": [ "xcb" ]
}

View File

@ -108,5 +108,7 @@ QT += dbus
LIBS += -ldbus-1
}
OTHER_FILES += xcb.json
target.path += $$[QT_INSTALL_PLUGINS]/platforms
INSTALLS += target