PVS: V629 Consider inspecting the 'col.red() << 24' expression. Bit shifting of the 32-bit value with a subsequent expansion to the 64-bit type.
This commit is contained in:
@@ -378,10 +378,11 @@ void ReportOutput::changeEvent(QEvent *ev)
|
||||
if (ev->type() == QEvent::StyleChange) {
|
||||
QPalette pal = palette();
|
||||
QColor color = pal.windowText().color();
|
||||
unsigned long text = (color.red() << 24) | (color.green() << 16) | (color.blue() << 8);
|
||||
unsigned int text = (color.red() << 24) | (color.green() << 16) | (color.blue() << 8);
|
||||
unsigned long value = static_cast<unsigned long>(text);
|
||||
// if this parameter is not already set use the style's window text color
|
||||
text = getWindowParameter()->GetUnsigned("colorText", text);
|
||||
getWindowParameter()->SetUnsigned("colorText", text);
|
||||
value = getWindowParameter()->GetUnsigned("colorText", value);
|
||||
getWindowParameter()->SetUnsigned("colorText", value);
|
||||
}
|
||||
QTextEdit::changeEvent(ev);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user