qt/hotkey: Get rid of global hotkey map instance

Instead, we make a proper registry class and house it within the main
window, then pass it to whatever needs access to the loaded hotkeys.

This way, we avoid a global variable, and don't need to initialize a
std::map instance before the program can do anything.
This commit is contained in:
Lioncash 2018-08-07 00:43:07 -04:00 committed by fearlessTobi
parent 0a5621fafc
commit cb1825a769
8 changed files with 177 additions and 136 deletions

View file

@ -56,6 +56,10 @@ void ConfigureGeneral::setConfiguration() {
ui->language_combobox->findData(UISettings::values.language));
}
void ConfigureGeneral::PopulateHotkeyList(const HotkeyRegistry& registry) {
ui->hotkeysDialog->Populate(registry);
}
void ConfigureGeneral::applyConfiguration() {
UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked();
UISettings::values.theme =