fix QAction::setVisible() regression since d504e5d4ad

also update the documentation about group state change that was made with
d504e5d4ad
This commit is contained in:
Ivailo Monev 2020-01-26 22:52:37 +00:00
parent eada44b207
commit 7de3b1c8f1
2 changed files with 3 additions and 4 deletions

View file

@ -1059,7 +1059,7 @@ void QAction::setVisible(bool b)
return;
QAPP_CHECK("setVisible");
d->visible = b;
d->enabled = b && d->enabled && (!d->group || d->group->isEnabled()) ;
d->enabled = b && (!d->group || d->group->isEnabled()) ;
#ifndef QT_NO_SHORTCUT
d->setShortcutEnabled(d->enabled, qApp->d_func()->shortcutMap);
#endif

View file

@ -278,8 +278,7 @@ bool QActionGroup::isExclusive() const
\property QActionGroup::enabled
\brief whether the action group is enabled
Each action in the group will be enabled or disabled unless it
has been explicitly disabled.
Each action in the group will be enabled or disabled.
\sa QAction::setEnabled()
*/
@ -313,7 +312,7 @@ QAction *QActionGroup::checkedAction() const
\brief whether the action group is visible
Each action in the action group will match the visible state of
this group unless it has been explicitly hidden.
this group.
\sa QAction::setEnabled()
*/