From b81af6ae9bdbf7edcdc6c1ec4f68d5e29ad18c5f Mon Sep 17 00:00:00 2001
From: VolcaEM <63682805+VolcaEM@users.noreply.github.com>
Date: Sun, 21 Jun 2020 06:09:28 +0200
Subject: [PATCH 1/6] Add a "Open Mods Page" button to the GUI

---
 src/yuzu/main.cpp | 13 +++++++++++++
 src/yuzu/main.h   |  1 +
 src/yuzu/main.ui  |  6 ++++++
 3 files changed, 20 insertions(+)

diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 270cccc77..826f8903b 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -57,6 +57,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
 #include <QStatusBar>
 #include <QSysInfo>
 #include <QtConcurrent/QtConcurrent>
+#include <QUrl>
 
 #include <fmt/format.h>
 #include "common/common_paths.h"
@@ -826,6 +827,7 @@ void GMainWindow::ConnectMenuEvents() {
     connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame);
     connect(ui.action_Report_Compatibility, &QAction::triggered, this,
             &GMainWindow::OnMenuReportCompatibility);
+    connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnSwitchModsPage);
     connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); });
     connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure);
 
@@ -1797,6 +1799,17 @@ void GMainWindow::OnMenuReportCompatibility() {
     }
 }
 
+void GMainWindow::OnSwitchModsPage() {
+    const std::string mods_page_url = "https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods";
+    const QString mods_page_url_qs = QString::fromStdString(mods_page_url);
+    const QUrl mods_page(mods_page_url_qs);
+    const bool open = QDesktopServices::openUrl(mods_page);
+    if (!open) {
+        QMessageBox::warning(this, tr("Error opening URL"),
+                             tr("Unable to open the URL \"%1\".").arg(mods_page_url_qs));
+    }
+}
+
 void GMainWindow::ToggleFullscreen() {
     if (!emulation_running) {
         return;
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index 4f4c8ddbe..7d9910608 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -181,6 +181,7 @@ private slots:
     void OnPauseGame();
     void OnStopGame();
     void OnMenuReportCompatibility();
+    void OnSwitchModsPage();
     /// Called whenever a user selects a game in the game list widget.
     void OnGameListLoadFile(QString game_path);
     void OnGameListOpenFolder(GameListOpenTarget target, const std::string& game_path);
diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui
index 97c90f50b..b5745dfd5 100644
--- a/src/yuzu/main.ui
+++ b/src/yuzu/main.ui
@@ -113,6 +113,7 @@
      <string>&amp;Help</string>
     </property>
     <addaction name="action_Report_Compatibility"/>
+    <addaction name="action_Open_Mods_Page"/>
     <addaction name="separator"/>
     <addaction name="action_About"/>
    </widget>
@@ -256,6 +257,11 @@
     <bool>false</bool>
    </property>
   </action>
+  <action name="action_Open_Mods_Page">
+   <property name="text">
+    <string>Open Mods Page</string>
+   </property>
+  </action>
   <action name="action_Open_yuzu_Folder">
    <property name="text">
     <string>Open yuzu Folder</string>

From 606e833d26a279dc1621b48b21994f1a6de3bf17 Mon Sep 17 00:00:00 2001
From: VolcaEM <63682805+VolcaEM@users.noreply.github.com>
Date: Sun, 21 Jun 2020 06:12:23 +0200
Subject: [PATCH 2/6] Address review comment by Lioncash

Co-authored-by: LC <mathew1800@gmail.com>
---
 src/yuzu/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 826f8903b..0ce7cd62a 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1800,7 +1800,7 @@ void GMainWindow::OnMenuReportCompatibility() {
 }
 
 void GMainWindow::OnSwitchModsPage() {
-    const std::string mods_page_url = "https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods";
+    const auto mods_page_url = QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods");
     const QString mods_page_url_qs = QString::fromStdString(mods_page_url);
     const QUrl mods_page(mods_page_url_qs);
     const bool open = QDesktopServices::openUrl(mods_page);

From d11b04ed46b2c6720e9bb222e98482097274a1f5 Mon Sep 17 00:00:00 2001
From: VolcaEM <63682805+VolcaEM@users.noreply.github.com>
Date: Sun, 21 Jun 2020 06:16:03 +0200
Subject: [PATCH 3/6] Remove unnecessary conversion

---
 src/yuzu/main.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 0ce7cd62a..6e6e5dffe 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1801,12 +1801,11 @@ void GMainWindow::OnMenuReportCompatibility() {
 
 void GMainWindow::OnSwitchModsPage() {
     const auto mods_page_url = QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods");
-    const QString mods_page_url_qs = QString::fromStdString(mods_page_url);
-    const QUrl mods_page(mods_page_url_qs);
+    const QUrl mods_page(mods_page_url);
     const bool open = QDesktopServices::openUrl(mods_page);
     if (!open) {
         QMessageBox::warning(this, tr("Error opening URL"),
-                             tr("Unable to open the URL \"%1\".").arg(mods_page_url_qs));
+                             tr("Unable to open the URL \"%1\".").arg(mods_page_url));
     }
 }
 

From 23d57ed4f733731206abcd4d9db7d8bdb34208e7 Mon Sep 17 00:00:00 2001
From: VolcaEM <63682805+VolcaEM@users.noreply.github.com>
Date: Sun, 21 Jun 2020 06:17:46 +0200
Subject: [PATCH 4/6] Clang-format

---
 src/yuzu/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 6e6e5dffe..e53c65f81 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -56,8 +56,8 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
 #include <QShortcut>
 #include <QStatusBar>
 #include <QSysInfo>
-#include <QtConcurrent/QtConcurrent>
 #include <QUrl>
+#include <QtConcurrent/QtConcurrent>
 
 #include <fmt/format.h>
 #include "common/common_paths.h"

From 182ac8a504233143fd2f78ef0dc4fb94331cff85 Mon Sep 17 00:00:00 2001
From: VolcaEM <63682805+VolcaEM@users.noreply.github.com>
Date: Sun, 21 Jun 2020 18:09:14 +0200
Subject: [PATCH 5/6] Correct function name (1/2)

---
 src/yuzu/main.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index 7d9910608..d55e55cc6 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -181,7 +181,7 @@ private slots:
     void OnPauseGame();
     void OnStopGame();
     void OnMenuReportCompatibility();
-    void OnSwitchModsPage();
+    void OnOpenModsPage();
     /// Called whenever a user selects a game in the game list widget.
     void OnGameListLoadFile(QString game_path);
     void OnGameListOpenFolder(GameListOpenTarget target, const std::string& game_path);

From 409fedaf974f6c6add862a518c8fa5e7c8a341b1 Mon Sep 17 00:00:00 2001
From: VolcaEM <63682805+VolcaEM@users.noreply.github.com>
Date: Sun, 21 Jun 2020 18:10:23 +0200
Subject: [PATCH 6/6] Correct function name (2/2)

---
 src/yuzu/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index e53c65f81..cb36bb869 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -827,7 +827,7 @@ void GMainWindow::ConnectMenuEvents() {
     connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame);
     connect(ui.action_Report_Compatibility, &QAction::triggered, this,
             &GMainWindow::OnMenuReportCompatibility);
-    connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnSwitchModsPage);
+    connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage);
     connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); });
     connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure);
 
@@ -1799,7 +1799,7 @@ void GMainWindow::OnMenuReportCompatibility() {
     }
 }
 
-void GMainWindow::OnSwitchModsPage() {
+void GMainWindow::OnOpenModsPage() {
     const auto mods_page_url = QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods");
     const QUrl mods_page(mods_page_url);
     const bool open = QDesktopServices::openUrl(mods_page);