qt5base-lts/tests/auto/gui/image
Marc Mutz f9acbaccde QPixmap::load: ensure QBitmap stays a QBitmap even on failure
... and avoid detach()ing potentially large data for just
preserving the QPlatformPixmap::pixelType().

A QBitmap differs from a QPixmap (its base class, urgh)
by always having a data != nullptr and a Bitmap pixel
type, yet load() was unconditionally setting 'data' to
nullptr on failure, turning a QBitmap into a non-QBitmap.

Fix by move-assigning a null QBitmap instead of resetting
'data'.

Add some tests.

Change-Id: Ida58b3b24d96472a5f9d0f18f81cc763edcf3c16
Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-10-06 16:39:13 +00:00
..
qicoimageformat ICO image format: fix regression in writing when size >= 256 2016-05-13 04:37:15 +00:00
qicon Fix possible null pointer dereferences. 2015-12-02 16:32:12 +00:00
qimage Backwards compatibility fix: No default colormap for Mono QImages 2016-07-27 11:46:11 +00:00
qimageiohandler Update copyright headers 2015-02-11 06:49:51 +00:00
qimagereader Crash fix: reject certain malformed bmp images 2016-02-05 04:14:35 +00:00
qimagewriter Remove ~tst_QImageWriter 2016-08-11 04:34:14 +00:00
qmovie tests/auto/gui: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 08:29:15 +00:00
qpicture Fix boundingRect test in tst_QPicture 2015-06-16 06:11:58 +00:00
qpixmap QPixmap::load: ensure QBitmap stays a QBitmap even on failure 2016-10-06 16:39:13 +00:00
qpixmapcache tests/auto/gui: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 08:29:15 +00:00
image.pro Check for network module when building according auto tests 2013-02-19 19:20:53 +01:00