Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
None
Description
The Qt documentation states that setIconVisibleInMenu has priority over Qt::AA_DontShowIconsInMenus.
Good. But unfortunatly it does not work in this case:
if Qt::AA_DontShowIconsInMenus is set to TRUE
then setIconVisibleInMenu(true) has no effect
The bug is easy to identify in qaction.cpp in function:
void QAction::setIconVisibleInMenu(bool visible)
There is the line:
if (visible != (bool)d->iconVisibleInMenu)
But this if FALSE if d->iconVisibleInMenu is -1 and visible is true.
The line should rather be:
if ((int)visible != d->iconVisibleInMenu)
Another related issue in the same function is the line:
&& visible == !QApplication::instance()->testAttribute(Qt::AA_DontShowIconsInMenus))) {
should be changed for:
&& visible != !QApplication::instance()->testAttribute(Qt::AA_DontShowIconsInMenus))) {
making these changes seems to restore expected functionality.