From 8995453263721507a4c923b905f50f800010d9ad Mon Sep 17 00:00:00 2001 From: Poul Sysolyatin Date: Mon, 21 Jan 2013 13:48:21 +0700 Subject: 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 --- src/gui/image/qimagereader.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/image/qimagereader.cpp') diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 71408ecd23..a6e15ede11 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -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; -- cgit v1.2.3 From 9d432881804edc3f680de610e40b669f97df6f9b Mon Sep 17 00:00:00 2001 From: Poul Sysolyatin Date: Mon, 21 Jan 2013 14:00:07 +0700 Subject: Exclude BMP from supported formats if it disabled by Qt build If Qt build without BMP support, we need exclude this format from output of QImageWriter::supportedImageFormats() and QImageReader::supportedImageFormats() methods. Task-number: QTBUG-27028 Change-Id: I44e8956247066c0836b1ff7bf9a1f356fe568af1 Reviewed-by: Gunnar Sletta --- src/gui/image/qimagereader.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/image/qimagereader.cpp') diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index a6e15ede11..5eaf7bb8f2 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -167,7 +167,9 @@ enum _qt_BuiltInFormatType { #ifdef QT_BUILTIN_GIF_READER _qt_GifFormat, #endif +#ifndef QT_NO_IMAGEFORMAT_BMP _qt_BmpFormat, +#endif #ifndef QT_NO_IMAGEFORMAT_PPM _qt_PpmFormat, _qt_PgmFormat, @@ -200,7 +202,9 @@ static const _qt_BuiltInFormatStruct _qt_BuiltInFormats[] = { #ifdef QT_BUILTIN_GIF_READER {_qt_GifFormat, "gif"}, #endif +#ifndef QT_NO_IMAGEFORMAT_BMP {_qt_BmpFormat, "bmp"}, +#endif #ifndef QT_NO_IMAGEFORMAT_PPM {_qt_PpmFormat, "ppm"}, {_qt_PgmFormat, "pgm"}, -- cgit v1.2.3