Avoid combining enum values from different enum types
Fixes static analyzer warnings. Task-number: QTBUG-91911 Change-Id: I55599d53bb98ada74ceb73d5668fcc18813c3ec4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
1b1844afef
commit
cd5a60089a
@ -909,9 +909,9 @@ QDataStream &operator<<(QDataStream &s, const QPen &p)
|
||||
if (s.version() < 3) {
|
||||
s << (quint8)p.style();
|
||||
} else if (s.version() < QDataStream::Qt_4_3) {
|
||||
s << (quint8)(p.style() | p.capStyle() | p.joinStyle());
|
||||
s << (quint8)(uint(p.style()) | uint(p.capStyle()) | uint(p.joinStyle()));
|
||||
} else {
|
||||
s << (quint16)(p.style() | p.capStyle() | p.joinStyle());
|
||||
s << (quint16)(uint(p.style()) | uint(p.capStyle()) | uint(p.joinStyle()));
|
||||
s << (bool)(dd->cosmetic);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user