Log messages when URL for news/help is missing

Found during Ref T32
This commit is contained in:
Klaus Basan
2017-04-21 03:14:19 +02:00
parent 61a140a5a4
commit e13f7e3e68
2 changed files with 10 additions and 2 deletions

View File

@@ -533,7 +533,11 @@ namespace BlackGui
{
const CGlobalSetup gs = this->getGlobalSetup();
const CUrl helpPage = gs.getHelpPageUrl();
if (helpPage.isEmpty()) { return; }
if (helpPage.isEmpty())
{
CLogMessage(this).warning("No help page");
return;
}
QDesktopServices::openUrl(helpPage);
}

View File

@@ -184,7 +184,11 @@ void CSwiftLauncher::loadLatestNews()
{
CFailoverUrlList newsUrls(sGui->getGlobalSetup().getSwiftLatestNewsUrls());
const CUrl newsUrl(newsUrls.obtainNextWorkingUrl());
if (newsUrl.isEmpty()) { return; }
if (newsUrl.isEmpty())
{
CLogMessage(this).error("No working news URL in %1") << newsUrls.toQString();
return;
}
sGui->getFromNetwork(newsUrl, { this, &CSwiftLauncher::ps_displayLatestNews});
}