Log status when news is received

This commit is contained in:
Klaus Basan
2017-08-10 18:45:11 +02:00
committed by Mathew Sutcliffe
parent 8119aafca4
commit e89d7d7b15

View File

@@ -122,6 +122,7 @@ void CSwiftLauncher::ps_displayLatestNews(QNetworkReply *reply)
{
const QString html = nwReply->readAll().trimmed();
if (html.isEmpty()) { return; }
CLogMessage(this).info("Received news from '%1'") << nwReply->url().toString();
ui->tbr_LatestNews->setHtml(html); // causes QFSFileEngine::open: No file name specified
constexpr qint64 newNews = 72 * 3600 * 1000;
const qint64 deltaT = CNetworkUtils::lastModifiedSinceNow(nwReply.data());
@@ -130,6 +131,10 @@ void CSwiftLauncher::ps_displayLatestNews(QNetworkReply *reply)
ui->tb_Launcher->setCurrentWidget(ui->pg_LatestNews);
}
}
else
{
CLogMessage(this).warning("Error received news from '%1'") << nwReply->url().toString();
}
}
void CSwiftLauncher::ps_distributionInfoAvailable(bool success)