summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-07-05 16:59:02 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-07-09 09:38:12 +0200
commit7c82edc2b8dbbd4a1ae2fb43e288c6e3ffe6b401 (patch)
tree24414382fa8e2d485a270dbaa9207fb9e927cf1d /src
parent5fbdb5e5c361d42335427606f6bf9f461718d128 (diff)
downloadqtsvg-7c82edc2b8dbbd4a1ae2fb43e288c6e3ffe6b401.tar.gz
Fix compilation with disabled deprecated APIs
The QImageIOHandler::name() has been deprecated since 5.13, but its overrides weren't. Enabled compilation of the overrides only when the QImageIOHandler::name() is compiled. Task-number: QTBUG-76491 Change-Id: Ida625f19d61081cfd50ae11ab50cf7829aef80a5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/imageformats/svg/qsvgiohandler.cpp4
-rw-r--r--src/plugins/imageformats/svg/qsvgiohandler.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/imageformats/svg/qsvgiohandler.cpp b/src/plugins/imageformats/svg/qsvgiohandler.cpp
index a999d47..6999d51 100644
--- a/src/plugins/imageformats/svg/qsvgiohandler.cpp
+++ b/src/plugins/imageformats/svg/qsvgiohandler.cpp
@@ -140,12 +140,12 @@ bool QSvgIOHandler::canRead() const
return false;
}
-
+#if QT_DEPRECATED_SINCE(5, 13)
QByteArray QSvgIOHandler::name() const
{
return "svg";
}
-
+#endif
bool QSvgIOHandler::read(QImage *image)
{
diff --git a/src/plugins/imageformats/svg/qsvgiohandler.h b/src/plugins/imageformats/svg/qsvgiohandler.h
index fdafa0a..5fdf6ee 100644
--- a/src/plugins/imageformats/svg/qsvgiohandler.h
+++ b/src/plugins/imageformats/svg/qsvgiohandler.h
@@ -58,7 +58,9 @@ public:
QSvgIOHandler();
~QSvgIOHandler();
bool canRead() const override;
+#if QT_DEPRECATED_SINCE(5, 13)
QByteArray name() const override;
+#endif
bool read(QImage *image) override;
static bool canRead(QIODevice *device);
QVariant option(ImageOption option) const override;