-
Bug
-
Resolution: Done
-
P4: Low
-
4.3.1
-
None
-
2cdea6a10da75b7b8870f27c432a5e02f7500340
Since QAction group does not monitor the state of the checked action it can in some cases return a QAction that is not checked. This can happen when the current checked action is set as unchecked after it has been returned from QActionGroup.
QActionGroup::checkedAction() may return an action that is not checked.
Here is the source code from Qt 4.3.1:
/*!
Returns the currently checked action in the group, or 0 if none
are checked.
*/
QAction *QActionGroup::checkedAction() const
{
Q_D(const QActionGroup);
return d->current;
}
If doing something like:
QAction *l_action = group->checkedAction();
if (l_action)
{
l_action->setChecked(false);
if (l_action == group->checkedAction())
}
Since QActionGroup did not monitor checked state changes of its actions,
it will not set its d->current to 0.