| 107 | } |
| 108 | |
| 109 | void SettingDialog::handleButtonClicked() |
| 110 | { |
| 111 | if (!generalWidget->apply()) { |
| 112 | int index = mainWidget->indexOf(generalWidget); |
| 113 | handleSwitchWidget(btnBox->button(index)); |
| 114 | return; |
| 115 | } |
| 116 | |
| 117 | if (!resourceWidget->apply()) { |
| 118 | int index = mainWidget->indexOf(resourceWidget); |
| 119 | handleSwitchWidget(btnBox->button(index)); |
| 120 | return; |
| 121 | } |
| 122 | |
| 123 | promptWidget->apply(); |
| 124 | accept(); |
| 125 | } |