Remove dependency from QFactoryInterface for the print plugin
authorLars Knoll <lars.knoll@nokia.com>
Sun, 27 May 2012 03:25:47 +0000 (05:25 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 7 Jun 2012 22:12:20 +0000 (00:12 +0200)
Change-Id: Ia35890b72e7797ef655bf97b4a34af2908657c0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/plugins/printsupport/cocoa/main.cpp
src/plugins/printsupport/windows/main.cpp
src/printsupport/kernel/qplatformprintplugin.h

index 1291897..16f98ce 100644 (file)
@@ -52,15 +52,9 @@ class QCocoaPrinterSupportPlugin : public QPlatformPrinterSupportPlugin
     Q_PLUGIN_METADATA(IID "org.qt-project.QPlatformPrinterSupportFactoryInterface" FILE "cocoa.json")
 
 public:
-    QStringList keys() const;
     QPlatformPrinterSupport *create(const QString &);
 };
 
-QStringList QCocoaPrinterSupportPlugin::keys() const
-{
-    return QStringList(QStringLiteral("cocoaprintersupport"));
-}
-
 QPlatformPrinterSupport *QCocoaPrinterSupportPlugin::create(const QString &key)
 {
     if (key.compare(key, QStringLiteral("cocoaprintersupport"), Qt::CaseInsensitive) != 0)
index 7ddb892..bb0f937 100644 (file)
@@ -53,15 +53,9 @@ class QWindowsPrinterSupportPlugin : public QPlatformPrinterSupportPlugin
     Q_PLUGIN_METADATA(IID "org.qt-project.QPlatformPrinterSupportFactoryInterface" FILE "windows.json")
 
 public:
-    QStringList keys() const;
     QPlatformPrinterSupport *create(const QString &);
 };
 
-QStringList QWindowsPrinterSupportPlugin::keys() const
-{
-    return QStringList(QStringLiteral("windowsprintsupport"));
-}
-
 QPlatformPrinterSupport *QWindowsPrinterSupportPlugin::create(const QString &key)
 {
     if (key.compare(key, QStringLiteral("windowsprintsupport"), Qt::CaseInsensitive) == 0)
index 597a5f4..d7abfb6 100644 (file)
@@ -61,24 +61,15 @@ QT_BEGIN_NAMESPACE
 
 class QPlatformPrinterSupport;
 
-struct QPlatformPrinterSupportFactoryInterface : public QFactoryInterface
-{
-    virtual QPlatformPrinterSupport *create(const QString &key) = 0;
-};
-
 #define QPlatformPrinterSupportFactoryInterface_iid "org.qt-project.QPlatformPrinterSupportFactoryInterface"
 
-Q_DECLARE_INTERFACE(QPlatformPrinterSupportFactoryInterface, QPlatformPrinterSupportFactoryInterface_iid)
-
-class Q_PRINTSUPPORT_EXPORT QPlatformPrinterSupportPlugin : public QObject, public QPlatformPrinterSupportFactoryInterface
+class Q_PRINTSUPPORT_EXPORT QPlatformPrinterSupportPlugin : public QObject
 {
     Q_OBJECT
-    Q_INTERFACES(QPlatformPrinterSupportFactoryInterface:QFactoryInterface)
 public:
     explicit QPlatformPrinterSupportPlugin(QObject *parent = 0);
     ~QPlatformPrinterSupportPlugin();
 
-    virtual QStringList keys() const = 0;
     virtual QPlatformPrinterSupport *create(const QString &key) = 0;
 
     static QPlatformPrinterSupport *get();