summaryrefslogtreecommitdiff
path: root/src/plugins/iconengines
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/iconengines')
-rw-r--r--src/plugins/iconengines/svgiconengine/main.cpp16
-rw-r--r--src/plugins/iconengines/svgiconengine/qsvgiconengine-nocompress.json3
-rw-r--r--src/plugins/iconengines/svgiconengine/qsvgiconengine.h18
-rw-r--r--src/plugins/iconengines/svgiconengine/svgiconengine.pro1
4 files changed, 18 insertions, 20 deletions
diff --git a/src/plugins/iconengines/svgiconengine/main.cpp b/src/plugins/iconengines/svgiconengine/main.cpp
index ebcdc82..cedeb7a 100644
--- a/src/plugins/iconengines/svgiconengine/main.cpp
+++ b/src/plugins/iconengines/svgiconengine/main.cpp
@@ -51,22 +51,16 @@ QT_BEGIN_NAMESPACE
class QSvgIconPlugin : public QIconEnginePlugin
{
Q_OBJECT
+#ifndef QT_NO_COMPRESS
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QIconEngineFactoryInterface" FILE "qsvgiconengine.json")
+#else
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QIconEngineFactoryInterface" FILE "qsvgiconengine-nocompress.json")
+#endif
public:
- QStringList keys() const;
- QIconEngine *create(const QString &filename = QString());
+ QIconEngine *create(const QString &filename = QString()) override;
};
-QStringList QSvgIconPlugin::keys() const
-{
- QStringList keys(QLatin1String("svg"));
-#ifndef QT_NO_COMPRESS
- keys << QLatin1String("svgz") << QLatin1String("svg.gz");
-#endif
- return keys;
-}
-
QIconEngine *QSvgIconPlugin::create(const QString &file)
{
QSvgIconEngine *engine = new QSvgIconEngine;
diff --git a/src/plugins/iconengines/svgiconengine/qsvgiconengine-nocompress.json b/src/plugins/iconengines/svgiconengine/qsvgiconengine-nocompress.json
new file mode 100644
index 0000000..a3e1ac3
--- /dev/null
+++ b/src/plugins/iconengines/svgiconengine/qsvgiconengine-nocompress.json
@@ -0,0 +1,3 @@
+{
+ "Keys": [ "svg" ]
+}
diff --git a/src/plugins/iconengines/svgiconengine/qsvgiconengine.h b/src/plugins/iconengines/svgiconengine/qsvgiconengine.h
index 495a8b0..cf4f255 100644
--- a/src/plugins/iconengines/svgiconengine/qsvgiconengine.h
+++ b/src/plugins/iconengines/svgiconengine/qsvgiconengine.h
@@ -54,21 +54,21 @@ public:
QSvgIconEngine(const QSvgIconEngine &other);
~QSvgIconEngine();
void paint(QPainter *painter, const QRect &rect,
- QIcon::Mode mode, QIcon::State state);
+ QIcon::Mode mode, QIcon::State state) override;
QSize actualSize(const QSize &size, QIcon::Mode mode,
- QIcon::State state);
+ QIcon::State state) override;
QPixmap pixmap(const QSize &size, QIcon::Mode mode,
- QIcon::State state);
+ QIcon::State state) override;
void addPixmap(const QPixmap &pixmap, QIcon::Mode mode,
- QIcon::State state);
+ QIcon::State state) override;
void addFile(const QString &fileName, const QSize &size,
- QIcon::Mode mode, QIcon::State state);
+ QIcon::Mode mode, QIcon::State state) override;
- QString key() const;
- QIconEngine *clone() const;
- bool read(QDataStream &in);
- bool write(QDataStream &out) const;
+ QString key() const override;
+ QIconEngine *clone() const override;
+ bool read(QDataStream &in) override;
+ bool write(QDataStream &out) const override;
private:
QSharedDataPointer<QSvgIconEnginePrivate> d;
diff --git a/src/plugins/iconengines/svgiconengine/svgiconengine.pro b/src/plugins/iconengines/svgiconengine/svgiconengine.pro
index eb6847b..bfc739f 100644
--- a/src/plugins/iconengines/svgiconengine/svgiconengine.pro
+++ b/src/plugins/iconengines/svgiconengine/svgiconengine.pro
@@ -4,6 +4,7 @@ HEADERS += qsvgiconengine.h
SOURCES += main.cpp \
qsvgiconengine.cpp
OTHER_FILES += qsvgiconengine.json
+OTHER_FILES += qsvgiconengine-nocompress.json
QT += svg core-private gui-private
PLUGIN_TYPE = iconengines