QImageIOHandler: remove #if around virtual method name()

It makes -DQT_DISABLE_DEPRECATED_BEFORE=0x050d00 (in an application)
trigger a binary incompatible change and crash.

Change-Id: I9b9783d134821697180dc3fd8f2f69a51ddb7ac6
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
David Faure 2019-10-27 09:33:54 +01:00
parent fa0a79a2bb
commit 0fb995492d
2 changed files with 1 additions and 5 deletions

View File

@ -416,18 +416,16 @@ QByteArray QImageIOHandler::format() const
\sa read(), QIODevice::peek()
*/
#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
Use format() instead.
*/
QByteArray QImageIOHandler::name() const
QByteArray QImageIOHandler::name() const // ### Qt6: remove
{
return format();
}
#endif
/*!
Writes the image \a image to the assigned device. Returns \c true on

View File

@ -69,10 +69,8 @@ public:
void setFormat(const QByteArray &format) const;
QByteArray format() const;
#if QT_DEPRECATED_SINCE(5, 13)
QT_DEPRECATED_X("Use QImageIOHandler::format() instead")
virtual QByteArray name() const;
#endif
virtual bool canRead() const = 0;
virtual bool read(QImage *image) = 0;