From c8f6754417628d696f81513e34951193f8e5d023 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 7 Aug 2018 00:43:07 -0400 Subject: 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. --- src/yuzu/configuration/configure_general.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/yuzu/configuration/configure_general.h') diff --git a/src/yuzu/configuration/configure_general.h b/src/yuzu/configuration/configure_general.h index 447552d8c..4770034cc 100644 --- a/src/yuzu/configuration/configure_general.h +++ b/src/yuzu/configuration/configure_general.h @@ -7,6 +7,8 @@ #include #include +class HotkeyRegistry; + namespace Ui { class ConfigureGeneral; } @@ -18,11 +20,11 @@ public: explicit ConfigureGeneral(QWidget* parent = nullptr); ~ConfigureGeneral(); + void PopulateHotkeyList(const HotkeyRegistry& registry); void applyConfiguration(); private: void setConfiguration(); -private: std::unique_ptr ui; }; -- cgit v1.2.3