Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.2
-
None
-
-
cc4c0b43a54d9606f491c193df381a424ae696bf (qt/qtbase/5.12)
Description
I write a QPalette object and save it in a file with QDataStream in Qt5.7. Then I need restore it in Qt5.12. But I found that the read result is wrong.
I compared the file qpalette.cpp of Qt5.7 and Qt5.12, and I found that there is a problem with the code.
In the qpalette.cpp of Qt5.12, a new member was inserted before the member NColorRoles of the enumerating variable ColorRole, which made the relationship between
NColorRoles = ToolTipText + 1 not valid,
but NColorRoles was used where ToolTipText + 1 should be used in the code.
Line 1004 and 1042 in qpalette.cpp of Qt5.12:
Int max = QPalette:: NColorRoles; the value of max is 21;
In version 5.7:
Int max = QPalette:: ToolTipText + 1; the value of max is 20.
Attachments
For Gerrit Dashboard: QTBUG-74885 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
260621,4 | QDataStream: Fix inconsistent results of iostream with QPalette objects | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |