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>
This commit is contained in:
parent
9c7ebd191b
commit
e96cea51da
@ -1215,9 +1215,11 @@ int QGifHandler::currentImageNumber() const
|
||||
return frameNumber;
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 13)
|
||||
QByteArray QGifHandler::name() const
|
||||
{
|
||||
return "gif";
|
||||
}
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -73,7 +73,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);
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user