From 7de3b1c8f1a3764205cdebcdba8f21d00d30b673 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 26 Jan 2020 22:52:37 +0000 Subject: [PATCH] fix QAction::setVisible() regression since d504e5d4adbcd424377c526c2d35a8479e51d82d also update the documentation about group state change that was made with d504e5d4adbcd424377c526c2d35a8479e51d82d --- src/gui/kernel/qaction.cpp | 2 +- src/gui/kernel/qactiongroup.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp index bcacafa74..d8da4f533 100644 --- a/src/gui/kernel/qaction.cpp +++ b/src/gui/kernel/qaction.cpp @@ -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 diff --git a/src/gui/kernel/qactiongroup.cpp b/src/gui/kernel/qactiongroup.cpp index 6cffa01f2..db823f6bb 100644 --- a/src/gui/kernel/qactiongroup.cpp +++ b/src/gui/kernel/qactiongroup.cpp @@ -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() */