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:
parent
826b1394e8
commit
c8f6754417
8 changed files with 155 additions and 115 deletions
|
@ -6,9 +6,12 @@
|
|||
#include "ui_configure.h"
|
||||
#include "yuzu/configuration/config.h"
|
||||
#include "yuzu/configuration/configure_dialog.h"
|
||||
#include "yuzu/hotkeys.h"
|
||||
|
||||
ConfigureDialog::ConfigureDialog(QWidget* parent) : QDialog(parent), ui(new Ui::ConfigureDialog) {
|
||||
ConfigureDialog::ConfigureDialog(QWidget* parent, const HotkeyRegistry& registry)
|
||||
: QDialog(parent), ui(new Ui::ConfigureDialog) {
|
||||
ui->setupUi(this);
|
||||
ui->generalTab->PopulateHotkeyList(registry);
|
||||
this->setConfiguration();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue