Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.14.0
-
None
-
-
49b158e07de222473454e2485d981751eb5b5ccf (qt/qtbase/5.14)
Description
I was porting the Draggable Icons example to Qt for Python 5.14 and discovered a QPixmap serialization problem. When a QPixmap is written into a data stream, restored, and written again, the resulting data stream is only 4 bytes large. It seems like the restored QPixmap cannot be written into a data stream again.
I've reduced the code to the minimum where the problem can be reproduced. The attached examples (both Python and C++) have the following steps:
- Load a QPixmap from a file
- Serialize the pixmap into a QDataStream
- Restore the pixmap from the QDataStream: at this point, the image is restored correctly, it is rendered correctly as well
- Serialize the restored pixmap into a data stream: at this point, the data stream is only 4 bytes large (I suppose it contains only the data stream format marker)
- Try to restore the pixmap: obviously, nothing can be restored
The very same code works with Qt 5.13, so it appears to be a regression
Attachments
For Gerrit Dashboard: QTBUG-81671 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
288267,2 | Avoid return QImage::Format_Invalid from QPlatformScreen::format() | 5.14 | qt/qtbase | Status: MERGED | +2 | 0 |
288345,3 | Don't use libpng allocated buffer to store ICC profile data | 5.14 | qt/qtbase | Status: MERGED | +2 | 0 |