Ref T148, renamed/added hasConnectedSwiftDb / canConnectSwiftDb

This commit is contained in:
Klaus Basan
2017-09-04 15:32:25 +02:00
committed by Mathew Sutcliffe
parent a2e888546e
commit 961f47b700
5 changed files with 16 additions and 6 deletions

View File

@@ -21,6 +21,7 @@
#include "blackcore/vatsim/vatsimmetarreader.h"
#include "blackcore/vatsim/vatsimstatusfilereader.h"
#include "blackcore/webdataservices.h"
#include "blackmisc/network/networkutils.h"
#include "blackmisc/fileutils.h"
#include "blackmisc/logcategory.h"
#include "blackmisc/logcategorylist.h"
@@ -164,7 +165,7 @@ namespace BlackCore
initSharedInfoObjectReaderAndTriggerRead();
}
bool CWebDataServices::canConnectSwiftDb() const
bool CWebDataServices::hasConnectedSwiftDb() const
{
if (!m_icaoDataReader && !m_modelDataReader && !m_airportDataReader && !m_dbInfoDataReader) { return false; }
@@ -176,6 +177,12 @@ namespace BlackCore
return false;
}
bool CWebDataServices::canConnectSwiftDb(bool strict) const
{
if (!strict && this->hasConnectedSwiftDb()) { return true; }
return CNetworkUtils::canConnect(sApp->getGlobalSetup().getDbHomePageUrl());
}
void CWebDataServices::resetSignalFlags()
{
m_signalledEntities.clear();