mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-12 16:35:45 -04:00
Qt: Implement GitHub Repository/Issue Tracker links
This commit is contained in:
@ -6,6 +6,8 @@
|
|||||||
#include "qthostinterface.h"
|
#include "qthostinterface.h"
|
||||||
#include "qtsettingsinterface.h"
|
#include "qtsettingsinterface.h"
|
||||||
#include "settingsdialog.h"
|
#include "settingsdialog.h"
|
||||||
|
#include <QtCore/QUrl>
|
||||||
|
#include <QtGui/QDesktopServices>
|
||||||
#include <QtWidgets/QFileDialog>
|
#include <QtWidgets/QFileDialog>
|
||||||
#include <QtWidgets/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@ -171,9 +173,25 @@ void MainWindow::onStartBiosActionTriggered()
|
|||||||
m_host_interface->bootSystem(QString(), QString());
|
m_host_interface->bootSystem(QString(), QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onGitHubRepositoryActionTriggered() {}
|
static void OpenURL(QWidget* parent, const char* url)
|
||||||
|
{
|
||||||
|
const QUrl qurl(QUrl::fromEncoded(QByteArray(url, std::strlen(url))));
|
||||||
|
if (!QDesktopServices::openUrl(qurl))
|
||||||
|
{
|
||||||
|
QMessageBox::critical(parent, QObject::tr("Failed to open URL"),
|
||||||
|
QObject::tr("Failed to open URL.\n\nThe URL was: %1").arg(qurl.toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::onIssueTrackerActionTriggered() {}
|
void MainWindow::onGitHubRepositoryActionTriggered()
|
||||||
|
{
|
||||||
|
OpenURL(this, "https://github.com/stenzek/duckstation/");
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::onIssueTrackerActionTriggered()
|
||||||
|
{
|
||||||
|
OpenURL(this, "https://github.com/stenzek/duckstation/issues");
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::onAboutActionTriggered() {}
|
void MainWindow::onAboutActionTriggered() {}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user