Added 'jpeg' to QImageReader::supportedImageFormats()

When Qt build statically result of
QImageReader::supportedImageFormats() must contain 'jpeg' and
'jpg' if JPEG support enabled.

Task-number: QTBUG-29222

Change-Id: I94d731c2d1e2ede148e2e5261a310a840a1d5523
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
Poul Sysolyatin 2013-01-21 13:48:21 +07:00 committed by The Qt Project
parent d48534302c
commit 8995453263

View File

@ -162,6 +162,7 @@ enum _qt_BuiltInFormatType {
#endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
_qt_JpgFormat,
_qt_JpegFormat,
#endif
#ifdef QT_BUILTIN_GIF_READER
_qt_GifFormat,
@ -194,6 +195,7 @@ static const _qt_BuiltInFormatStruct _qt_BuiltInFormats[] = {
#endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
{_qt_JpgFormat, "jpg"},
{_qt_JpegFormat, "jpeg"},
#endif
#ifdef QT_BUILTIN_GIF_READER
{_qt_GifFormat, "gif"},
@ -422,6 +424,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
#endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
case _qt_JpgFormat:
case _qt_JpegFormat:
if (QJpegHandler::canRead(device))
handler = new QJpegHandler;
break;