--- a/QTfrontend/hwform.cpp Wed Sep 05 20:09:32 2018 +0200
+++ b/QTfrontend/hwform.cpp Thu Oct 04 21:17:21 2018 +0200
@@ -246,6 +246,7 @@
connect(ui.pageMain->BtnDataDownload, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
pageSwitchMapper->setMapping(ui.pageMain->BtnDataDownload, ID_PAGE_DATADOWNLOAD);
+ connect(ui.pageMain->BtnHelp, SIGNAL(clicked()), this, SLOT(GoToHelp()));
#ifdef VIDEOREC
connect(ui.pageMain->BtnVideos, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
@@ -641,6 +642,13 @@
GoToPage(ID_PAGE_SCHEME);
}
+void HWForm::GoToHelp()
+{
+ // For now just opens the Hedgewars Wiki in external browser.
+ // TODO: Replace this with an offline help someday (bug 660).
+ QDesktopServices::openUrl(QUrl("https://hedgewars.org/wiki"));
+}
+
void HWForm::GoToVideos()
{
GoToPage(ID_PAGE_VIDEOS);
@@ -1865,6 +1873,8 @@
connect(game, SIGNAL(SendConsoleCommand(const QString&)), hwnet, SLOT(consoleCommand(const QString&)));
connect(game, SIGNAL(SendTeamMessage(const QString &)), hwnet, SLOT(SendTeamMessage(const QString &)));
connect(hwnet, SIGNAL(chatStringFromNet(const QString &)), game, SLOT(FromNetChat(const QString &)), Qt::QueuedConnection);
+ connect(hwnet, SIGNAL(Warning(const QString&)), game, SLOT(FromNetWarning(const QString&)), Qt::QueuedConnection);
+ connect(hwnet, SIGNAL(Error(const QString&)), game, SLOT(FromNetError(const QString&)), Qt::QueuedConnection);
game->StartNet();
}