Skip to content
Snippets Groups Projects
Commit dbf13f81 authored by Lioncash's avatar Lioncash
Browse files

configure_hotkeys: Mark member variables as const where applicable in Configure()

parent cf6cdd20
No related branches found
No related tags found
No related merge requests found
......@@ -71,16 +71,16 @@ void ConfigureHotkeys::Configure(QModelIndex index) {
}
index = index.sibling(index.row(), 1);
auto* model = ui->hotkey_list->model();
auto previous_key = model->data(index);
auto* const model = ui->hotkey_list->model();
const auto previous_key = model->data(index);
auto* hotkey_dialog = new SequenceDialog;
int return_code = hotkey_dialog->exec();
auto* const hotkey_dialog = new SequenceDialog;
auto key_sequence = hotkey_dialog->GetSequence();
if (return_code == QDialog::Rejected || key_sequence.isEmpty())
const int return_code = hotkey_dialog->exec();
const auto key_sequence = hotkey_dialog->GetSequence();
if (return_code == QDialog::Rejected || key_sequence.isEmpty()) {
return;
}
if (IsUsedKey(key_sequence) && key_sequence != QKeySequence(previous_key.toString())) {
QMessageBox::critical(this, tr("Error in inputted key"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment