diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-10-15 14:19:42 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-10-15 14:56:32 (GMT) |
commit | a38dcd522e05514a8caeeee7d01b05ec6af23fe1 (patch) | |
tree | c00ca164f826e1955819b152f985b79d0c7a6c64 /src/gui/image | |
parent | ac0fe3babf0c0b6f634af98b24dbeaae1453f11b (diff) | |
download | Qt-a38dcd522e05514a8caeeee7d01b05ec6af23fe1.zip Qt-a38dcd522e05514a8caeeee7d01b05ec6af23fe1.tar.gz Qt-a38dcd522e05514a8caeeee7d01b05ec6af23fe1.tar.bz2 |
Fixed QPainter::begin() so that it fails gracefully.
Fixed QPainter::begin() so that if it fails, it can still be used on
other paint devices without causing an assert. Autotest included.
I also made begin() fail on images with the QImage::Format_Indexed8
format and added warnings in the documentation since painting on such
images is not supported.
Reviewed-by: Trond
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qimage.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 9048387..21ab40c 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -377,6 +377,9 @@ bool QImageData::checkForAlphaPixels() const \note If you would like to load QImage objects in a static build of Qt, refer to the \l{How To Create Qt Plugins#Static Plugins}{Plugin HowTo}. + \warning Painting on a QImage with the format + QImage::Format_Indexed8 is not supported. + \tableofcontents \section1 Reading and Writing Image Files |