mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +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
@@ -179,7 +179,7 @@ namespace BlackCore
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).error("No URL for %1") << CEntityFlags::flagToString(CEntityFlags::LiveryEntity);
|
||||
this->logNoWorkingUrl(CEntityFlags::LiveryEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace BlackCore
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).error("No URL for %1") << CEntityFlags::flagToString(CEntityFlags::DistributorEntity);
|
||||
this->logNoWorkingUrl(CEntityFlags::DistributorEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace BlackCore
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).error("No URL for %1") << CEntityFlags::flagToString(CEntityFlags::ModelEntity);
|
||||
this->logNoWorkingUrl(CEntityFlags::ModelEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -569,6 +569,24 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
CEntityFlags::Entity CModelDataReader::getEntitiesWithCacheCount() const
|
||||
{
|
||||
CEntityFlags::Entity entities = CEntityFlags::NoEntity;
|
||||
if (this->getCacheCount(CEntityFlags::LiveryEntity) > 0) entities |= CEntityFlags::LiveryEntity;
|
||||
if (this->getCacheCount(CEntityFlags::ModelEntity) > 0) entities |= CEntityFlags::ModelEntity;
|
||||
if (this->getCacheCount(CEntityFlags::DistributorEntity) > 0) entities |= CEntityFlags::DistributorEntity;
|
||||
return entities;
|
||||
}
|
||||
|
||||
CEntityFlags::Entity CModelDataReader::getEntitiesWithCacheTimestampNewerThan(const QDateTime &threshold) const
|
||||
{
|
||||
CEntityFlags::Entity entities = CEntityFlags::NoEntity;
|
||||
if (this->hasCacheTimestampNewerThan(CEntityFlags::LiveryEntity, threshold)) entities |= CEntityFlags::LiveryEntity;
|
||||
if (this->hasCacheTimestampNewerThan(CEntityFlags::ModelEntity, threshold)) entities |= CEntityFlags::ModelEntity;
|
||||
if (this->hasCacheTimestampNewerThan(CEntityFlags::DistributorEntity, threshold)) entities |= CEntityFlags::DistributorEntity;
|
||||
return entities;
|
||||
}
|
||||
|
||||
bool CModelDataReader::hasChangedUrl(CEntityFlags::Entity entity, CUrl &oldUrlInfo, CUrl &newUrlInfo) const
|
||||
{
|
||||
Q_UNUSED(entity);
|
||||
|
||||
Reference in New Issue
Block a user