replace local constant with the enum for in QPalette data stream operator

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-07-06 22:35:56 +03:00
parent 41ce90510b
commit 97c4c460f8

View file

@ -871,9 +871,8 @@ QPalette QPalette::resolve(const QPalette &other) const
QDataStream &operator<<(QDataStream &s, const QPalette &p)
{
const int max = QPalette::ToolTipText + 1;
for (int grp = 0; grp < (int)QPalette::NColorGroups; grp++) {
for (int r = 0; r < max; r++)
for (int grp = 0; grp < QPalette::NColorGroups; grp++) {
for (int r = 0; r < QPalette::NColorRoles; r++)
s << p.d->br[grp][r];
}
return s;