summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-05-27 05:25:47 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-08 00:12:20 +0200
commit02191b6e4b03fe05b1b953b3e5d5e456cc5817c9 (patch)
tree74ab227585ec52c6882a2f875910c729ee6963bb
parent7715a2d0a55a8988162d32663c572cff7fbf64f6 (diff)
Remove dependency from QFactoryInterface for the print plugin
Change-Id: Ia35890b72e7797ef655bf97b4a34af2908657c0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/plugins/printsupport/cocoa/main.cpp6
-rw-r--r--src/plugins/printsupport/windows/main.cpp6
-rw-r--r--src/printsupport/kernel/qplatformprintplugin.h11
3 files changed, 1 insertions, 22 deletions
diff --git a/src/plugins/printsupport/cocoa/main.cpp b/src/plugins/printsupport/cocoa/main.cpp
index 12918974f3..16f98cecd2 100644
--- a/src/plugins/printsupport/cocoa/main.cpp
+++ b/src/plugins/printsupport/cocoa/main.cpp
@@ -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)
diff --git a/src/plugins/printsupport/windows/main.cpp b/src/plugins/printsupport/windows/main.cpp
index 7ddb89212b..bb0f9372a1 100644
--- a/src/plugins/printsupport/windows/main.cpp
+++ b/src/plugins/printsupport/windows/main.cpp
@@ -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)
diff --git a/src/printsupport/kernel/qplatformprintplugin.h b/src/printsupport/kernel/qplatformprintplugin.h
index 597a5f4fcf..d7abfb65f8 100644
--- a/src/printsupport/kernel/qplatformprintplugin.h
+++ b/src/printsupport/kernel/qplatformprintplugin.h
@@ -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();