diff options
| author | 2020-06-25 23:31:01 +0200 | |
|---|---|---|
| committer | 2020-06-25 23:31:01 +0200 | |
| commit | 9e7ac6a009002aacba48f9c167efc58cfe34241d (patch) | |
| tree | ac9da22084dcfb62b77f2f968fa6526b96f021e8 /src | |
| parent | Use QUrl (1/2) (diff) | |
| download | yuzu-9e7ac6a009002aacba48f9c167efc58cfe34241d.tar.gz yuzu-9e7ac6a009002aacba48f9c167efc58cfe34241d.tar.xz yuzu-9e7ac6a009002aacba48f9c167efc58cfe34241d.zip | |
Use QUrl (2/2)
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e454347d9..a2f637b96 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -1801,26 +1801,25 @@ void GMainWindow::OnMenuReportCompatibility() { | |||
| 1801 | } | 1801 | } |
| 1802 | } | 1802 | } |
| 1803 | 1803 | ||
| 1804 | void GMainWindow::OpenURL(const QString& url_str) { | 1804 | void GMainWindow::OpenURL(QUrl const& url) { |
| 1805 | 1805 | ||
| 1806 | const QUrl url{url_str}; | ||
| 1807 | const bool open = QDesktopServices::openUrl(url); | 1806 | const bool open = QDesktopServices::openUrl(url); |
| 1808 | if (!open) { | 1807 | if (!open) { |
| 1809 | QMessageBox::warning(this, tr("Error opening URL"), | 1808 | QMessageBox::warning(this, tr("Error opening URL"), |
| 1810 | tr("Unable to open the URL \"%1\".").arg(url_str)); | 1809 | tr("Unable to open the URL \"%1\".").arg(url.toString())); |
| 1811 | } | 1810 | } |
| 1812 | } | 1811 | } |
| 1813 | 1812 | ||
| 1814 | void GMainWindow::OnOpenModsPage() { | 1813 | void GMainWindow::OnOpenModsPage() { |
| 1815 | this->OpenURL(QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods")); | 1814 | OpenURL(QUrl(QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"))); |
| 1816 | } | 1815 | } |
| 1817 | 1816 | ||
| 1818 | void GMainWindow::OnQuickstartGuide() { | 1817 | void GMainWindow::OnQuickstartGuide() { |
| 1819 | this->OpenURL(QStringLiteral("https://yuzu-emu.org/help/quickstart/")); | 1818 | OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/help/quickstart/"))); |
| 1820 | } | 1819 | } |
| 1821 | 1820 | ||
| 1822 | void GMainWindow::OnFAQ() { | 1821 | void GMainWindow::OnFAQ() { |
| 1823 | this->OpenURL(QStringLiteral("https://yuzu-emu.org/wiki/faq/")); | 1822 | OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/wiki/faq/"))); |
| 1824 | } | 1823 | } |
| 1825 | 1824 | ||
| 1826 | void GMainWindow::ToggleFullscreen() { | 1825 | void GMainWindow::ToggleFullscreen() { |