summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-02-17 16:56:00 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-17 17:02:56 +0100
commitb20232a052ecd4f14dc5b914036b246339f6ff6a (patch)
tree48b4bfe7497ef69c1d36628bff41922774f9b95a
parentfe0bc6a5663a4f0d95d62243639049f3fef3eb50 (diff)
downloadqtsvg-b20232a052ecd4f14dc5b914036b246339f6ff6a.tar.gz
Use new plugin system in QtSvg.
Change-Id: I9e588b7907f1d956d1f1feb018d61e375130b2d9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r--src/plugins/iconengines/svgiconengine/main.cpp8
-rw-r--r--src/plugins/iconengines/svgiconengine/qsvgiconengine.json3
-rw-r--r--src/plugins/iconengines/svgiconengine/svgiconengine.pro3
-rw-r--r--src/plugins/imageformats/svg/main.cpp8
-rw-r--r--src/plugins/imageformats/svg/svg.json3
5 files changed, 17 insertions, 8 deletions
diff --git a/src/plugins/iconengines/svgiconengine/main.cpp b/src/plugins/iconengines/svgiconengine/main.cpp
index accacf5..9a62e07 100644
--- a/src/plugins/iconengines/svgiconengine/main.cpp
+++ b/src/plugins/iconengines/svgiconengine/main.cpp
@@ -54,6 +54,9 @@ QT_BEGIN_NAMESPACE
class QSvgIconPlugin : public QIconEnginePlugin
{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QIconEngineFactoryInterface" FILE "qsvgiconengine.json")
+
public:
QStringList keys() const;
QIconEngine *create(const QString &filename = QString());
@@ -76,9 +79,8 @@ QIconEngine *QSvgIconPlugin::create(const QString &file)
return engine;
}
-Q_EXPORT_STATIC_PLUGIN(QSvgIconPlugin)
-Q_EXPORT_PLUGIN2(qsvgicon, QSvgIconPlugin)
-
QT_END_NAMESPACE
+#include "main.moc"
+
#endif // !QT_NO_IMAGEFORMATPLUGIN
diff --git a/src/plugins/iconengines/svgiconengine/qsvgiconengine.json b/src/plugins/iconengines/svgiconengine/qsvgiconengine.json
new file mode 100644
index 0000000..65e97c0
--- /dev/null
+++ b/src/plugins/iconengines/svgiconengine/qsvgiconengine.json
@@ -0,0 +1,3 @@
+{
+ "Keys": [ "svg", "svgz", "svg.gz" ]
+}
diff --git a/src/plugins/iconengines/svgiconengine/svgiconengine.pro b/src/plugins/iconengines/svgiconengine/svgiconengine.pro
index d13e0ea..c0fd28a 100644
--- a/src/plugins/iconengines/svgiconengine/svgiconengine.pro
+++ b/src/plugins/iconengines/svgiconengine/svgiconengine.pro
@@ -6,10 +6,9 @@ load(qt_plugin)
HEADERS += qsvgiconengine.h
SOURCES += main.cpp \
qsvgiconengine.cpp
+OTHER_FILES += qsvgiconengine.json
QT += xml svg widgets
DESTDIR = $$QT.svg.plugins/iconengines
target.path += $$[QT_INSTALL_PLUGINS]/iconengines
INSTALLS += target
-
-symbian:TARGET.UID3=0x2001B2E3
diff --git a/src/plugins/imageformats/svg/main.cpp b/src/plugins/imageformats/svg/main.cpp
index 29240da..bd225ed 100644
--- a/src/plugins/imageformats/svg/main.cpp
+++ b/src/plugins/imageformats/svg/main.cpp
@@ -54,6 +54,9 @@ QT_BEGIN_NAMESPACE
class QSvgPlugin : public QImageIOPlugin
{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "svg.json")
+
public:
QStringList keys() const;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const;
@@ -86,9 +89,8 @@ QImageIOHandler *QSvgPlugin::create(QIODevice *device, const QByteArray &format)
return hand;
}
-Q_EXPORT_STATIC_PLUGIN(QSvgPlugin)
-Q_EXPORT_PLUGIN2(qsvg, QSvgPlugin)
-
QT_END_NAMESPACE
+#include "main.moc"
+
#endif // !QT_NO_IMAGEFORMATPLUGIN
diff --git a/src/plugins/imageformats/svg/svg.json b/src/plugins/imageformats/svg/svg.json
new file mode 100644
index 0000000..c63e4c8
--- /dev/null
+++ b/src/plugins/imageformats/svg/svg.json
@@ -0,0 +1,3 @@
+{
+ "Keys": [ "svg", "svgz" ]
+}