Redundant condition: widget

Redundant condition: widget. '!widget || (widget && widget->isEnabled())'
is equivalent to '!widget || widget->isEnabled()'

Change-Id: Ife915bd5ea66f8ccff48a1612f8c78c263075c89
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit d3ec08eea060a9451f06c394bb85a6357504c61e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Huang Jie 2021-03-04 09:48:18 +08:00 committed by Qt Cherry-pick Bot
parent 9ff12dcfe1
commit 8dbc4d029e

View File

@ -3223,7 +3223,7 @@ int QWindowsXPStyle::styleHint(StyleHint hint, const QStyleOption *option, const
break;
case SH_GroupBox_TextLabelColor:
if (!widget || (widget && widget->isEnabled()))
if (!widget || widget->isEnabled())
res = d->groupBoxTextColor;
else
res = d->groupBoxTextColorDisabled;