diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2023-11-25 04:59:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-25 04:59:55 +0100 |
commit | 5a182f4e7ccfac696cd54542089c880d002f5cc9 (patch) | |
tree | e1bcd72f38f4f57ff6b915022268b0feb86a7937 /src/yuzu/hotkeys.h | |
parent | Merge pull request #12140 from liamwhite/qcr-unreachable (diff) | |
parent | frontend_common: Don't specify default value for screenshot_path (diff) | |
download | yuzu-5a182f4e7ccfac696cd54542089c880d002f5cc9.tar yuzu-5a182f4e7ccfac696cd54542089c880d002f5cc9.tar.gz yuzu-5a182f4e7ccfac696cd54542089c880d002f5cc9.tar.bz2 yuzu-5a182f4e7ccfac696cd54542089c880d002f5cc9.tar.lz yuzu-5a182f4e7ccfac696cd54542089c880d002f5cc9.tar.xz yuzu-5a182f4e7ccfac696cd54542089c880d002f5cc9.tar.zst yuzu-5a182f4e7ccfac696cd54542089c880d002f5cc9.zip |
Diffstat (limited to 'src/yuzu/hotkeys.h')
-rw-r--r-- | src/yuzu/hotkeys.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/yuzu/hotkeys.h b/src/yuzu/hotkeys.h index 56eee8d82..e11332d2e 100644 --- a/src/yuzu/hotkeys.h +++ b/src/yuzu/hotkeys.h @@ -33,7 +33,7 @@ public: ~ControllerShortcut(); void SetKey(const ControllerButtonSequence& buttons); - void SetKey(const QString& buttons_shortcut); + void SetKey(const std::string& buttons_shortcut); ControllerButtonSequence ButtonSequence() const; @@ -88,8 +88,8 @@ public: * will be the same. Thus, you shouldn't rely on the caller really being the * QShortcut's parent. */ - QShortcut* GetHotkey(const QString& group, const QString& action, QWidget* widget); - ControllerShortcut* GetControllerHotkey(const QString& group, const QString& action, + QShortcut* GetHotkey(const std::string& group, const std::string& action, QWidget* widget); + ControllerShortcut* GetControllerHotkey(const std::string& group, const std::string& action, Core::HID::EmulatedController* controller); /** @@ -98,7 +98,7 @@ public: * @param group General group this hotkey belongs to (e.g. "Main Window", "Debugger"). * @param action Name of the action (e.g. "Start Emulation", "Load Image"). */ - QKeySequence GetKeySequence(const QString& group, const QString& action); + QKeySequence GetKeySequence(const std::string& group, const std::string& action); /** * Returns a Qt::ShortcutContext object who can be connected to other @@ -108,20 +108,20 @@ public: * "Debugger"). * @param action Name of the action (e.g. "Start Emulation", "Load Image"). */ - Qt::ShortcutContext GetShortcutContext(const QString& group, const QString& action); + Qt::ShortcutContext GetShortcutContext(const std::string& group, const std::string& action); private: struct Hotkey { QKeySequence keyseq; - QString controller_keyseq; + std::string controller_keyseq; QShortcut* shortcut = nullptr; ControllerShortcut* controller_shortcut = nullptr; Qt::ShortcutContext context = Qt::WindowShortcut; bool repeat; }; - using HotkeyMap = std::map<QString, Hotkey>; - using HotkeyGroupMap = std::map<QString, HotkeyMap>; + using HotkeyMap = std::map<std::string, Hotkey>; + using HotkeyGroupMap = std::map<std::string, HotkeyMap>; HotkeyGroupMap hotkey_groups; }; |