diff options
author | Poul Sysolyatin <psytonx@gmail.com> | 2013-01-21 14:00:07 +0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-29 09:28:19 +0100 |
commit | 9d432881804edc3f680de610e40b669f97df6f9b (patch) | |
tree | a4c87d8c0254d0cd2deae0e6751051124e8db030 /src/gui/image | |
parent | 8995453263721507a4c923b905f50f800010d9ad (diff) |
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 <gunnar.sletta@digia.com>
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qimagereader.cpp | 4 | ||||
-rw-r--r-- | src/gui/image/qimagewriter.cpp | 2 |
2 files changed, 6 insertions, 0 deletions
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"}, diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp index 8e0f3fdcf0..20e601be03 100644 --- a/src/gui/image/qimagewriter.cpp +++ b/src/gui/image/qimagewriter.cpp @@ -708,7 +708,9 @@ void supportedImageHandlerFormats(QFactoryLoader *loader, QList<QByteArray> QImageWriter::supportedImageFormats() { QSet<QByteArray> formats; +#ifndef QT_NO_IMAGEFORMAT_BMP formats << "bmp"; +#endif #ifndef QT_NO_IMAGEFORMAT_PPM formats << "pbm" << "pgm" << "ppm"; #endif |