yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Use QUrl (2/2)

This commit is contained in:
VolcaEM 2020-06-25 23:31:01 +02:00 committed by GitHub
parent 5c6adea222
commit 9e7ac6a009
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -1801,26 +1801,25 @@ void GMainWindow::OnMenuReportCompatibility() {
} }
} }
void GMainWindow::OpenURL(const QString& url_str) { void GMainWindow::OpenURL(QUrl const& url) {
const QUrl url{url_str};
const bool open = QDesktopServices::openUrl(url); const bool open = QDesktopServices::openUrl(url);
if (!open) { if (!open) {
QMessageBox::warning(this, tr("Error opening URL"), QMessageBox::warning(this, tr("Error opening URL"),
tr("Unable to open the URL \"%1\".").arg(url_str)); tr("Unable to open the URL \"%1\".").arg(url.toString()));
} }
} }
void GMainWindow::OnOpenModsPage() { void GMainWindow::OnOpenModsPage() {
this->OpenURL(QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods")); OpenURL(QUrl(QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods")));
} }
void GMainWindow::OnQuickstartGuide() { void GMainWindow::OnQuickstartGuide() {
this->OpenURL(QStringLiteral("https://yuzu-emu.org/help/quickstart/")); OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/help/quickstart/")));
} }
void GMainWindow::OnFAQ() { void GMainWindow::OnFAQ() {
this->OpenURL(QStringLiteral("https://yuzu-emu.org/wiki/faq/")); OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/wiki/faq/")));
} }
void GMainWindow::ToggleFullscreen() { void GMainWindow::ToggleFullscreen() {