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:
Lioncash 2019-04-09 19:47:18 -04:00 committed by fearlessTobi
parent c33c27d646
commit 47176e19be

View file

@ -70,8 +70,9 @@ void ConfigureHotkeys::OnInputKeysChanged(QList<QKeySequence> new_key_list) {
} }
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();