Fix URL hardcoding in the Qt UI
This commit is contained in:
@@ -46,10 +46,13 @@
|
||||
#define COPYRIGHT_YEAR "@EMU_COPYRIGHT_YEAR@"
|
||||
|
||||
/* Web URL info. */
|
||||
#define EMU_SITE L"86box.net"
|
||||
#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest"
|
||||
#define EMU_SITE "86box.net"
|
||||
#define EMU_SITE_W LSTR(EMU_SITE)
|
||||
#define EMU_ROMS_URL "https://github.com/86Box/roms/releases/latest"
|
||||
#define EMU_ROMS_URL_W LSTR(EMU_ROMS_URL)
|
||||
#ifdef RELEASE_BUILD
|
||||
# define EMU_DOCS_URL L"https://86box.readthedocs.io/en/v@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@/"
|
||||
# define EMU_DOCS_URL "https://86box.readthedocs.io/en/v@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@/"
|
||||
#else
|
||||
# define EMU_DOCS_URL L"https://86box.readthedocs.io"
|
||||
# define EMU_DOCS_URL "https://86box.readthedocs.io"
|
||||
#endif
|
||||
#define EMU_DOCS_URL_W LSTR(EMU_DOCS_URL)
|
||||
|
@@ -35,10 +35,13 @@
|
||||
#define COPYRIGHT_YEAR "2022"
|
||||
|
||||
/* Web URL info. */
|
||||
#define EMU_SITE L"86box.net"
|
||||
#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest"
|
||||
#define EMU_SITE "86box.net"
|
||||
#define EMU_SITE_W LSTR(EMU_SITE)
|
||||
#define EMU_ROMS_URL "https://github.com/86Box/roms/releases/latest"
|
||||
#define EMU_ROMS_URL_W LSTR(EMU_ROMS_URL)
|
||||
#ifdef RELEASE_BUILD
|
||||
# define EMU_DOCS_URL L"https://86box.readthedocs.io/en/v3.0/"
|
||||
# define EMU_DOCS_URL "https://86box.readthedocs.io/en/v3.2/"
|
||||
#else
|
||||
# define EMU_DOCS_URL L"https://86box.readthedocs.io"
|
||||
# define EMU_DOCS_URL "https://86box.readthedocs.io"
|
||||
#endif
|
||||
#define EMU_DOCS_URL_W LSTR(EMU_DOCS_URL)
|
||||
|
@@ -1433,10 +1433,10 @@ void MainWindow::on_actionAbout_86Box_triggered()
|
||||
msgBox.setInformativeText(tr("An emulator of old computers\n\nAuthors: Sarah Walker, Miran Grca, Fred N. van Kempen (waltje), SA1988, Tiseno100, reenigne, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information."));
|
||||
msgBox.setWindowTitle("About 86Box");
|
||||
msgBox.addButton("OK", QMessageBox::ButtonRole::AcceptRole);
|
||||
auto webSiteButton = msgBox.addButton("86box.net", QMessageBox::ButtonRole::HelpRole);
|
||||
auto webSiteButton = msgBox.addButton(EMU_SITE, QMessageBox::ButtonRole::HelpRole);
|
||||
webSiteButton->connect(webSiteButton, &QPushButton::released, []()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://86box.net/"));
|
||||
QDesktopServices::openUrl(QUrl("https://" EMU_SITE));
|
||||
});
|
||||
#ifdef RELEASE_BUILD
|
||||
msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-green.ico").pixmap(32, 32));
|
||||
@@ -1453,7 +1453,7 @@ void MainWindow::on_actionAbout_86Box_triggered()
|
||||
|
||||
void MainWindow::on_actionDocumentation_triggered()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://86box.readthedocs.io"));
|
||||
QDesktopServices::openUrl(QUrl(EMU_DOCS_URL));
|
||||
}
|
||||
|
||||
void MainWindow::on_actionCGA_PCjr_Tandy_EGA_S_VGA_overscan_triggered() {
|
||||
|
@@ -63,5 +63,5 @@ AboutDialogCreate(HWND hwnd)
|
||||
TaskDialogIndirect(&tdconfig, &i, NULL, NULL);
|
||||
|
||||
if (i == IDOK)
|
||||
ShellExecute(hwnd, L"open", L"https://" EMU_SITE, NULL, NULL, SW_SHOW);
|
||||
ShellExecute(hwnd, L"open", L"https://" EMU_SITE_W, NULL, NULL, SW_SHOW);
|
||||
}
|
||||
|
@@ -574,7 +574,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
|
||||
case IDM_DOCS:
|
||||
ShellExecute(hwnd, L"open", EMU_DOCS_URL, NULL, NULL, SW_SHOW);
|
||||
ShellExecute(hwnd, L"open", EMU_DOCS_URL_W, NULL, NULL, SW_SHOW);
|
||||
break;
|
||||
|
||||
case IDM_UPDATE_ICONS:
|
||||
|
Reference in New Issue
Block a user