From b82f54762b4be0a5f6104d27ddd182f4b88d9027 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Wed, 26 Feb 2020 19:31:10 +0000 Subject: [PATCH 1/3] Qt: Use builtin Find and Quit key sequences --- Source/Core/DolphinQt/MenuBar.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinQt/MenuBar.cpp b/Source/Core/DolphinQt/MenuBar.cpp index 36be3e9304..fac3aa7058 100644 --- a/Source/Core/DolphinQt/MenuBar.cpp +++ b/Source/Core/DolphinQt/MenuBar.cpp @@ -199,8 +199,7 @@ void MenuBar::AddDVDBackupMenu(QMenu* file_menu) void MenuBar::AddFileMenu() { QMenu* file_menu = addMenu(tr("&File")); - m_open_action = file_menu->addAction(tr("&Open..."), this, &MenuBar::Open, - QKeySequence(Qt::CTRL + Qt::Key_O)); + m_open_action = file_menu->addAction(tr("&Open..."), this, &MenuBar::Open, QKeySequence::Open); file_menu->addSeparator(); @@ -211,8 +210,8 @@ void MenuBar::AddFileMenu() file_menu->addSeparator(); - m_exit_action = - file_menu->addAction(tr("E&xit"), this, &MenuBar::Exit, QKeySequence(Qt::ALT + Qt::Key_F4)); + m_exit_action = file_menu->addAction(tr("E&xit"), this, &MenuBar::Exit); + m_exit_action->setShortcuts({QKeySequence::Quit, QKeySequence(Qt::ALT + Qt::Key_F4)}); } void MenuBar::AddToolsMenu() @@ -488,8 +487,7 @@ void MenuBar::AddViewMenu() view_menu->addSeparator(); view_menu->addAction(tr("Purge Game List Cache"), this, &MenuBar::PurgeGameListCache); view_menu->addSeparator(); - view_menu->addAction(tr("Search"), this, &MenuBar::ShowSearch, - QKeySequence(Qt::CTRL + Qt::Key_F)); + view_menu->addAction(tr("Search"), this, &MenuBar::ShowSearch, QKeySequence::Find); } void MenuBar::AddOptionsMenu() From eda31c782e2b2af6701188281b835a7edd4fe0b5 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Wed, 26 Feb 2020 19:37:02 +0000 Subject: [PATCH 2/3] Qt: Add Configuration shortcut --- Source/Core/DolphinQt/MenuBar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt/MenuBar.cpp b/Source/Core/DolphinQt/MenuBar.cpp index fac3aa7058..14b433b77b 100644 --- a/Source/Core/DolphinQt/MenuBar.cpp +++ b/Source/Core/DolphinQt/MenuBar.cpp @@ -493,7 +493,8 @@ void MenuBar::AddViewMenu() void MenuBar::AddOptionsMenu() { QMenu* options_menu = addMenu(tr("&Options")); - options_menu->addAction(tr("Co&nfiguration"), this, &MenuBar::Configure); + options_menu->addAction(tr("Co&nfiguration"), this, &MenuBar::Configure, + QKeySequence::Preferences); options_menu->addSeparator(); options_menu->addAction(tr("&Graphics Settings"), this, &MenuBar::ConfigureGraphics); options_menu->addAction(tr("&Audio Settings"), this, &MenuBar::ConfigureAudio); From cd2cf137bab0c710c6c253f3e0b35a1685488bd9 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sun, 1 Mar 2020 23:14:55 +0000 Subject: [PATCH 3/3] Use ZoomIn/ZoomOut QKeySequence in GameList --- Source/Core/DolphinQt/GameList/GameList.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt/GameList/GameList.cpp b/Source/Core/DolphinQt/GameList/GameList.cpp index 9f166db56e..2f83d5b2b7 100644 --- a/Source/Core/DolphinQt/GameList/GameList.cpp +++ b/Source/Core/DolphinQt/GameList/GameList.cpp @@ -82,8 +82,8 @@ GameList::GameList(QWidget* parent) : QStackedWidget(parent) m_prefer_list = Settings::Instance().GetPreferredView(); ConsiderViewChange(); - auto* zoom_in = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Plus), this); - auto* zoom_out = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Minus), this); + auto* zoom_in = new QShortcut(QKeySequence::ZoomIn, this); + auto* zoom_out = new QShortcut(QKeySequence::ZoomOut, this); connect(zoom_in, &QShortcut::activated, this, &GameList::ZoomIn); connect(zoom_out, &QShortcut::activated, this, &GameList::ZoomOut);