mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-11 06:25:33 +08:00
Ref T148, database reader extensions
* allow to set severity of failed reading * get entities with cached data * removed needsSharedInfoFileLoaded in CDatabaseReaderConfig
This commit is contained in:
committed by
Mathew Sutcliffe
parent
c0a6574c80
commit
a2e888546e
@@ -152,7 +152,7 @@ namespace BlackCore
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).error("No URL for %1") << CEntityFlags::flagToString(CEntityFlags::AircraftIcaoEntity);
|
||||
this->logNoWorkingUrl(CEntityFlags::AircraftIcaoEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ namespace BlackCore
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).error("No URL for %1") << CEntityFlags::flagToString(CEntityFlags::AirlineIcaoEntity);
|
||||
this->logNoWorkingUrl(CEntityFlags::AirlineIcaoEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace BlackCore
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).error("No URL for %1") << CEntityFlags::flagToString(CEntityFlags::CountryEntity);
|
||||
this->logNoWorkingUrl(CEntityFlags::CountryEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -557,6 +557,24 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
CEntityFlags::Entity CIcaoDataReader::getEntitiesWithCacheCount() const
|
||||
{
|
||||
CEntityFlags::Entity entities = CEntityFlags::NoEntity;
|
||||
if (this->getCacheCount(CEntityFlags::AircraftIcaoEntity) > 0) entities |= CEntityFlags::AircraftIcaoEntity;
|
||||
if (this->getCacheCount(CEntityFlags::AirlineIcaoEntity) > 0) entities |= CEntityFlags::AirlineIcaoEntity;
|
||||
if (this->getCacheCount(CEntityFlags::CountryEntity) > 0) entities |= CEntityFlags::CountryEntity;
|
||||
return entities;
|
||||
}
|
||||
|
||||
CEntityFlags::Entity CIcaoDataReader::getEntitiesWithCacheTimestampNewerThan(const QDateTime &threshold) const
|
||||
{
|
||||
CEntityFlags::Entity entities = CEntityFlags::NoEntity;
|
||||
if (this->hasCacheTimestampNewerThan(CEntityFlags::AircraftIcaoEntity, threshold)) entities |= CEntityFlags::AircraftIcaoEntity;
|
||||
if (this->hasCacheTimestampNewerThan(CEntityFlags::AirlineIcaoEntity, threshold)) entities |= CEntityFlags::AirlineIcaoEntity;
|
||||
if (this->hasCacheTimestampNewerThan(CEntityFlags::CountryEntity, threshold)) entities |= CEntityFlags::CountryEntity;
|
||||
return entities;
|
||||
}
|
||||
|
||||
bool CIcaoDataReader::hasChangedUrl(CEntityFlags::Entity entity, CUrl &oldUrlInfo, CUrl &newUrlInfo) const
|
||||
{
|
||||
Q_UNUSED(entity);
|
||||
|
||||
Reference in New Issue
Block a user