summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats/jpeg
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/jpeg
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/jpeg')
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp2
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler_p.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 54fe857908..aed2900356 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -1124,9 +1124,11 @@ void QJpegHandler::setOption(ImageOption option, const QVariant &value)
}
}
+#if QT_DEPRECATED_SINCE(5, 13)
QByteArray QJpegHandler::name() const
{
return "jpeg";
}
+#endif
QT_END_NAMESPACE
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler_p.h b/src/plugins/imageformats/jpeg/qjpeghandler_p.h
index d832bf82f3..fafa930c11 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler_p.h
+++ b/src/plugins/imageformats/jpeg/qjpeghandler_p.h
@@ -68,7 +68,9 @@ public:
bool read(QImage *image) override;
bool write(const QImage &image) override;
+#if QT_DEPRECATED_SINCE(5, 13)
QByteArray name() const override;
+#endif
static bool canRead(QIODevice *device);