Utility function to directly log warning when network not accessible

This commit is contained in:
Klaus Basan
2017-07-11 20:03:24 +02:00
committed by Mathew Sutcliffe
parent 8aed8f598e
commit 76b3b6c0b6
7 changed files with 16 additions and 33 deletions

View File

@@ -64,11 +64,7 @@ namespace BlackCore
{
this->threadAssertCheck();
if (!this->doWorkCheck()) { return; }
if (!this->isNetworkAccessible())
{
CLogMessage(this).warning("No network, cannot read VATSIM bookings");
return;
}
if (!this->isNetworkAccessible("No network, cannot read VATSIM bookings")) { return; }
Q_ASSERT_X(sApp, Q_FUNC_INFO, "No application");
const QUrl url(sApp->getGlobalSetup().getVatsimBookingsUrl());