diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-12-09 11:46:00 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-12-09 11:48:39 (GMT) |
commit | a405437ca9294bf4f0f974739bd1130e165491b8 (patch) | |
tree | 062f731d60e63d897060dc7a7e981173154a2c0f | |
parent | 5a700d89a2263bcfc91d785c1ed444b1ecdacf83 (diff) | |
download | Qt-a405437ca9294bf4f0f974739bd1130e165491b8.zip Qt-a405437ca9294bf4f0f974739bd1130e165491b8.tar.gz Qt-a405437ca9294bf4f0f974739bd1130e165491b8.tar.bz2 |
Access to image needs to be protected in QS60PixmapData
The image can get corrupted if access to it is not properly
surrounded with beginDataAccess and endDataAccess calls.
Task-number: QTBUG-6050
Reviewed-by: Jani Hautakangas
-rw-r--r-- | src/gui/image/qpixmap_s60.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index dc33ade..610317d 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -820,7 +820,9 @@ void* QS60PixmapData::toNativeType(NativeType type) if(displayMode == EGray2) { //Symbian thinks set pixels are white/transparent, Qt thinks they are foreground/solid //So invert mono bitmaps so that masks work correctly. + beginDataAccess(); image.invertPixels(); + endDataAccess(); needsCopy = true; } @@ -828,7 +830,9 @@ void* QS60PixmapData::toNativeType(NativeType type) QImage source; if (convertToArgb32) { + beginDataAccess(); source = image.convertToFormat(QImage::Format_ARGB32); + endDataAccess(); displayMode = EColor16MA; } else { source = image; @@ -858,7 +862,9 @@ void* QS60PixmapData::toNativeType(NativeType type) if(displayMode == EGray2) { // restore pixels + beginDataAccess(); image.invertPixels(); + endDataAccess(); } return reinterpret_cast<void*>(bitmap); |