summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-10-01 11:53:18 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-10-01 11:58:46 (GMT)
commit8b179f84f10eb84d9e76662959d2b39e4316d6f9 (patch)
tree76f02eb7d776c5ffed71e9d697c2bb88db5e4fdb
parenta5957fde4d34c9571c3eadd620df9d490189ddd5 (diff)
downloadQt-8b179f84f10eb84d9e76662959d2b39e4316d6f9.zip
Qt-8b179f84f10eb84d9e76662959d2b39e4316d6f9.tar.gz
Qt-8b179f84f10eb84d9e76662959d2b39e4316d6f9.tar.bz2
Fixed QPixmap::fromImage when using Format_Mono for Symbian.
The intermediate sourceImage was stored to wrong QImage object (image instead of correct sourceImage). This made subsequent switch-case statement to fail because destFormat was set to QImage::Format_Invalid Autotest: Fixes QItemDelegate::decoration autotest Reviewed-by: Jani Hautakangas
-rw-r--r--src/gui/image/qpixmap_s60.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index dccc691..4938442 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -476,9 +476,9 @@ void QS60PixmapData::fromImage(const QImage &img, Qt::ImageConversionFlags flags
sourceImage = img.convertToFormat(QImage::Format_MonoLSB);
} else {
if (img.depth() == 1) {
- image = img.hasAlphaChannel()
- ? img.convertToFormat(QImage::Format_ARGB32_Premultiplied)
- : img.convertToFormat(QImage::Format_RGB32);
+ sourceImage = img.hasAlphaChannel()
+ ? img.convertToFormat(QImage::Format_ARGB32_Premultiplied)
+ : img.convertToFormat(QImage::Format_RGB32);
} else {
QImage::Format opaqueFormat = QNativeImage::systemFormat();