summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats/ico
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-07-05 17:12:18 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-07-08 20:41:33 +0200
commite96cea51da99629b33036e4b06738316a7ca4682 (patch)
treeaa8595a57d1ce432fc8675a177d820fbe9fbd7e2 /src/plugins/imageformats/ico
parent9c7ebd191b9862c28e9c96a511ec2878b7a3591d (diff)
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: I8fea0032427d25bb0de01be8920c723fc21f6b7a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/imageformats/ico')
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp3
-rw-r--r--src/plugins/imageformats/ico/qicohandler.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp
index 4908850cc5..c8e31dceac 100644
--- a/src/plugins/imageformats/ico/qicohandler.cpp
+++ b/src/plugins/imageformats/ico/qicohandler.cpp
@@ -818,6 +818,7 @@ bool QtIcoHandler::write(const QImage &image)
return ICOReader::write(device, imgs);
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
* Return the common identifier of the format.
* For ICO format this will return "ico".
@@ -826,7 +827,7 @@ QByteArray QtIcoHandler::name() const
{
return "ico";
}
-
+#endif
/*! \reimp
diff --git a/src/plugins/imageformats/ico/qicohandler.h b/src/plugins/imageformats/ico/qicohandler.h
index 435f036113..328dfce47e 100644
--- a/src/plugins/imageformats/ico/qicohandler.h
+++ b/src/plugins/imageformats/ico/qicohandler.h
@@ -54,7 +54,9 @@ public:
bool read(QImage *image) override;
bool write(const QImage &image) override;
+#if QT_DEPRECATED_SINCE(5, 13)
QByteArray name() const override;
+#endif
int imageCount() const override;
bool jumpToImage(int imageNumber) override;