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:
Klaus Basan
2017-09-04 15:15:13 +02:00
committed by Mathew Sutcliffe
parent c0a6574c80
commit a2e888546e
12 changed files with 159 additions and 42 deletions

View File

@@ -81,10 +81,25 @@ namespace BlackCore
return 0;
}
CEntityFlags::Entity CInfoDataReader::getEntitiesWithCacheCount() const
{
CEntityFlags::Entity entities = CEntityFlags::NoEntity;
return entities;
}
CEntityFlags::Entity CInfoDataReader::getEntitiesWithCacheTimestampNewerThan(const QDateTime &threshold) const
{
Q_UNUSED(threshold);
CEntityFlags::Entity entities = CEntityFlags::NoEntity;
return entities;
}
bool CInfoDataReader::hasChangedUrl(CEntityFlags::Entity entity, CUrl &oldUrlInfo, CUrl &newUrlInfo) const
{
// not implemented
Q_UNUSED(entity);
// init the URLs
oldUrlInfo = this->getBaseUrl(CDbFlags::DbReading);
newUrlInfo = this->getBaseUrl(CDbFlags::DbReading);
return false;
@@ -106,7 +121,7 @@ namespace BlackCore
}
else
{
CLogMessage(this).error("No URL for '%1'") << CEntityFlags::flagToString(this->getEntityForMode());
this->logNoWorkingUrl(this->getEntityForMode());
}
}
@@ -162,8 +177,7 @@ namespace BlackCore
{
case CDbFlags::DbReading: return getDbInfoObjectsUrl();
case CDbFlags::Shared: return getSharedInfoObjectsUrl();
default:
qFatal("Wrong mode");
default: qFatal("Wrong mode");
}
return CUrl();
}