qt5base-lts/tests/auto/gui/image/qpixmap
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
..
convertFromImage Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
convertFromToHICON Purge sRGB chunks from PNGs in tests. 2016-03-29 08:39:43 +00:00
images Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
loadFromData Purge sRGB chunks from PNGs in tests. 2016-03-29 08:39:43 +00:00
.gitignore Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
qpixmap.pro fix usage of wince scope 2015-06-05 10:29:10 +00:00
qpixmap.qrc Android: Fix qpixmap test. 2015-01-08 10:10:50 +01:00
tst_qpixmap.cpp QPixmap::load: ensure QBitmap stays a QBitmap even on failure 2016-10-06 16:39:13 +00:00