mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 01:02:48 +01:00
configure_hotkeys: Make comparison check a little more self-documenting
This is checking if an index is valid or not and returning early if it isn't.
This commit is contained in:
parent
c4ba717491
commit
cf6cdd20f8
1 changed files with 2 additions and 1 deletions
|
@ -66,8 +66,9 @@ void ConfigureHotkeys::Populate(const HotkeyRegistry& registry) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureHotkeys::Configure(QModelIndex index) {
|
void ConfigureHotkeys::Configure(QModelIndex index) {
|
||||||
if (index.parent() == QModelIndex())
|
if (!index.parent().isValid()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
index = index.sibling(index.row(), 1);
|
index = index.sibling(index.row(), 1);
|
||||||
auto* model = ui->hotkey_list->model();
|
auto* model = ui->hotkey_list->model();
|
||||||
|
|
Loading…
Reference in a new issue