1
1
Fork 0
forked from suyu/suyu

Merge pull request #4540 from lioncash/tr3

configure_hotkeys: Don't translate empty strings
This commit is contained in:
bunnei 2020-08-17 12:24:58 -04:00 committed by GitHub
commit 3472c00b3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,7 +154,7 @@ void ConfigureHotkeys::ClearAll() {
const QStandardItem* parent = model->item(r, 0);
for (int r2 = 0; r2 < parent->rowCount(); ++r2) {
model->item(r, 0)->child(r2, 1)->setText(tr(""));
model->item(r, 0)->child(r2, 1)->setText(QString{});
}
}
}
@ -186,7 +186,7 @@ void ConfigureHotkeys::PopupContextMenu(const QPoint& menu_location) {
model->setData(selected, default_key_sequence.toString(QKeySequence::NativeText));
}
});
connect(clear, &QAction::triggered, [this, selected] { model->setData(selected, tr("")); });
connect(clear, &QAction::triggered, [this, selected] { model->setData(selected, QString{}); });
context_menu.exec(ui->hotkey_list->viewport()->mapToGlobal(menu_location));
}