summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-08-26 12:29:48 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-10-06 16:39:13 +0000
commitf9acbaccde278eaf44a5324c2a63a99a4cccfb1c (patch)
treeb59227df18bd8c4dc77488af4f9181e68ef61605 /examples
parent237b36a72cf0646ba28e762bfde0cb398f4041e8 (diff)
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>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions