| 220 | } |
| 221 | |
| 222 | void ServerConfigDialog::editHotkey() |
| 223 | { |
| 224 | int row = ui->listHotkeys->currentRow(); |
| 225 | if (row < 0 || row >= serverConfig().hotkeys().size()) { |
| 226 | qDebug() << "Attempt to editing out of bounds hotkey row: " << row; |
| 227 | return; |
| 228 | } |
| 229 | |
| 230 | Hotkey &hotkey = serverConfig().hotkeys()[row]; |
| 231 | HotkeyDialog dlg(this, hotkey); |
| 232 | if (dlg.exec() == QDialog::Accepted) { |
| 233 | ui->listHotkeys->currentItem()->setText(hotkey.text()); |
| 234 | onChange(); |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | void ServerConfigDialog::removeHotkey() |
| 239 | { |