Redundant condition: tornoff
Redundant condition: tornoff. '!tornoff || (tornoff && scroll)' is equivalent to '!tornoff || scroll' Pick-to: 6.1 Change-Id: I8339faa4d53360db280173ee489e48eba4883b70 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
d3ec08eea0
commit
712117f8b8
@ -472,7 +472,7 @@ void QMenuPrivate::updateActionRects(const QRect &screen) const
|
||||
}
|
||||
|
||||
max_column_width += tabWidth; //finally add in the tab width
|
||||
if (!tornoff || (tornoff && scroll)) { // exclude non-scrollable tear-off menu since the tear-off menu has a fixed size
|
||||
if (!tornoff || scroll) { // exclude non-scrollable tear-off menu since the tear-off menu has a fixed size
|
||||
const int sfcMargin = style->sizeFromContents(QStyle::CT_Menu, &opt, QSize(0, 0), q).width();
|
||||
const int min_column_width = q->minimumWidth() - (sfcMargin + leftmargin + rightmargin + 2 * (fw + hmargin));
|
||||
max_column_width = qMax(min_column_width, max_column_width);
|
||||
|
Loading…
Reference in New Issue
Block a user