mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Rename CThreadedReader::isNetworkConnectedAndAccessible() for consistency
refs #869
This commit is contained in:
committed by
Mathew Sutcliffe
parent
64a47da67f
commit
7edd1bb621
@@ -182,7 +182,7 @@ namespace BlackCore
|
|||||||
this->threadAssertCheck();
|
this->threadAssertCheck();
|
||||||
if (this->isShuttingDown()) { return; }
|
if (this->isShuttingDown()) { return; }
|
||||||
entity &= CEntityFlags::AirportEntity;
|
entity &= CEntityFlags::AirportEntity;
|
||||||
if (!this->isNetworkConnectedAndAccessible())
|
if (!this->isNetworkAccessible())
|
||||||
{
|
{
|
||||||
emit this->dataRead(entity, CEntityFlags::ReadSkipped, 0);
|
emit this->dataRead(entity, CEntityFlags::ReadSkipped, 0);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
// ps_read is implemented in the derived classes
|
// ps_read is implemented in the derived classes
|
||||||
if (entities == CEntityFlags::NoEntity) { return; }
|
if (entities == CEntityFlags::NoEntity) { return; }
|
||||||
if (!this->isNetworkConnectedAndAccessible())
|
if (!this->isNetworkAccessible())
|
||||||
{
|
{
|
||||||
CLogMessage(this).warning("No network, will not read %1") << CEntityFlags::flagToString(entities);
|
CLogMessage(this).warning("No network, will not read %1") << CEntityFlags::flagToString(entities);
|
||||||
return;
|
return;
|
||||||
@@ -318,7 +318,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
bool CDatabaseReader::requestHeadersOfSharedFiles(const CEntityFlags::Entity &entities)
|
bool CDatabaseReader::requestHeadersOfSharedFiles(const CEntityFlags::Entity &entities)
|
||||||
{
|
{
|
||||||
if (!this->isNetworkConnectedAndAccessible())
|
if (!this->isNetworkAccessible())
|
||||||
{
|
{
|
||||||
CLogMessage(this).warning("No network, will not read shared file headers for %1") << CEntityFlags::flagToString(entities);
|
CLogMessage(this).warning("No network, will not read shared file headers for %1") << CEntityFlags::flagToString(entities);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ namespace BlackCore
|
|||||||
this->threadAssertCheck(); // runs in background thread
|
this->threadAssertCheck(); // runs in background thread
|
||||||
if (this->isShuttingDown()) { return; }
|
if (this->isShuttingDown()) { return; }
|
||||||
entities &= CEntityFlags::AllIcaoAndCountries;
|
entities &= CEntityFlags::AllIcaoAndCountries;
|
||||||
if (!this->isNetworkConnectedAndAccessible())
|
if (!this->isNetworkAccessible())
|
||||||
{
|
{
|
||||||
emit this->dataRead(entities, CEntityFlags::ReadSkipped, 0);
|
emit this->dataRead(entities, CEntityFlags::ReadSkipped, 0);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ namespace BlackCore
|
|||||||
this->threadAssertCheck();
|
this->threadAssertCheck();
|
||||||
if (this->isShuttingDown()) { return; }
|
if (this->isShuttingDown()) { return; }
|
||||||
entities &= CEntityFlags::DistributorLiveryModel;
|
entities &= CEntityFlags::DistributorLiveryModel;
|
||||||
if (!this->isNetworkConnectedAndAccessible())
|
if (!this->isNetworkAccessible())
|
||||||
{
|
{
|
||||||
emit this->dataRead(entities, CEntityFlags::ReadSkipped, 0);
|
emit this->dataRead(entities, CEntityFlags::ReadSkipped, 0);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace BlackCore
|
|||||||
return delta <= timeLastMs;
|
return delta <= timeLastMs;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CThreadedReader::isNetworkConnectedAndAccessible() const
|
bool CThreadedReader::isNetworkAccessible() const
|
||||||
{
|
{
|
||||||
return sApp->isNetworkAccessible();
|
return sApp->isNetworkAccessible();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ namespace BlackCore
|
|||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
bool updatedWithinLastMs(qint64 timeLastMs);
|
bool updatedWithinLastMs(qint64 timeLastMs);
|
||||||
|
|
||||||
//! Network available
|
//! Network accessable?
|
||||||
bool isNetworkConnectedAndAccessible() const;
|
bool isNetworkAccessible() const;
|
||||||
|
|
||||||
//! Is marked as read failed
|
//! Is marked as read failed
|
||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
void CVatsimBookingReader::ps_read()
|
void CVatsimBookingReader::ps_read()
|
||||||
{
|
{
|
||||||
if (!this->isNetworkConnectedAndAccessible())
|
if (!this->isNetworkAccessible())
|
||||||
{
|
{
|
||||||
CLogMessage(this).warning("No network, cannot read VATSIM bookings");
|
CLogMessage(this).warning("No network, cannot read VATSIM bookings");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
void CVatsimDataFileReader::ps_read()
|
void CVatsimDataFileReader::ps_read()
|
||||||
{
|
{
|
||||||
if (!this->isNetworkConnectedAndAccessible())
|
if (!this->isNetworkAccessible())
|
||||||
{
|
{
|
||||||
CLogMessage(this).warning("No network, cannot read VATSIM data file");
|
CLogMessage(this).warning("No network, cannot read VATSIM data file");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ namespace BlackCore
|
|||||||
void CVatsimMetarReader::readMetars()
|
void CVatsimMetarReader::readMetars()
|
||||||
{
|
{
|
||||||
if (this->isAbandoned()) { return; }
|
if (this->isAbandoned()) { return; }
|
||||||
if (!this->isNetworkConnectedAndAccessible())
|
if (!this->isNetworkAccessible())
|
||||||
{
|
{
|
||||||
CLogMessage(this).warning("No network, cannot read METARs");
|
CLogMessage(this).warning("No network, cannot read METARs");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace BlackCore
|
|||||||
void CVatsimStatusFileReader::ps_read()
|
void CVatsimStatusFileReader::ps_read()
|
||||||
{
|
{
|
||||||
this->threadAssertCheck();
|
this->threadAssertCheck();
|
||||||
if (!this->isNetworkConnectedAndAccessible()) { return; }
|
if (!this->isNetworkAccessible()) { return; }
|
||||||
|
|
||||||
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Missing application");
|
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Missing application");
|
||||||
CFailoverUrlList urls(sApp->getGlobalSetup().getVatsimStatusFileUrls());
|
CFailoverUrlList urls(sApp->getGlobalSetup().getVatsimStatusFileUrls());
|
||||||
|
|||||||
Reference in New Issue
Block a user