summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-04-10 01:50:14 +0200
committerLioncash <mathew1800@gmail.com>2019-04-10 01:50:14 +0200
commitdbf13f8169dc4ab84b97f27e26575375f3b51124 (patch)
tree852a02d5a5bcd1039d232bb3b4686be55cb70d81
parentconfigure_hotkeys: Make comparison check a little more self-documenting (diff)
downloadyuzu-dbf13f8169dc4ab84b97f27e26575375f3b51124.tar
yuzu-dbf13f8169dc4ab84b97f27e26575375f3b51124.tar.gz
yuzu-dbf13f8169dc4ab84b97f27e26575375f3b51124.tar.bz2
yuzu-dbf13f8169dc4ab84b97f27e26575375f3b51124.tar.lz
yuzu-dbf13f8169dc4ab84b97f27e26575375f3b51124.tar.xz
yuzu-dbf13f8169dc4ab84b97f27e26575375f3b51124.tar.zst
yuzu-dbf13f8169dc4ab84b97f27e26575375f3b51124.zip
-rw-r--r--src/yuzu/configuration/configure_hotkeys.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/yuzu/configuration/configure_hotkeys.cpp b/src/yuzu/configuration/configure_hotkeys.cpp
index e1ddf61eb..7a09b66b4 100644
--- a/src/yuzu/configuration/configure_hotkeys.cpp
+++ b/src/yuzu/configuration/configure_hotkeys.cpp
@@ -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"),