src/gui/kernel/qactiongroup.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    70 void QActionGroupPrivate::_q_actionChanged()
    70 void QActionGroupPrivate::_q_actionChanged()
    71 {
    71 {
    72     Q_Q(QActionGroup);
    72     Q_Q(QActionGroup);
    73     QAction *action = qobject_cast<QAction*>(q->sender());
    73     QAction *action = qobject_cast<QAction*>(q->sender());
    74     Q_ASSERT_X(action != 0, "QWidgetGroup::_q_actionChanged", "internal error");
    74     Q_ASSERT_X(action != 0, "QWidgetGroup::_q_actionChanged", "internal error");
    75     if(exclusive && action->isChecked() && action != current) {
    75     if(exclusive) {
    76         if(current)
    76         if (action->isChecked()) {
    77             current->setChecked(false);
    77             if (action != current) {
    78         current = action;
    78                 if(current)
       
    79                     current->setChecked(false);
       
    80                 current = action;
       
    81             }
       
    82         } else if (action == current) {
       
    83             current = 0;
       
    84         }
    79     }
    85     }
    80 }
    86 }
    81 
    87 
    82 void QActionGroupPrivate::_q_actionTriggered()
    88 void QActionGroupPrivate::_q_actionTriggered()
    83 {
    89 {