refs #787, fixed unit test

* flag update for non cached scenarios was missing
* some minor adjustments of test readers
This commit is contained in:
Klaus Basan
2016-11-28 20:29:40 +01:00
parent 387a39be77
commit 8f779fff35
4 changed files with 23 additions and 14 deletions

View File

@@ -103,14 +103,28 @@ namespace BlackCore
cachedEntities |= currentEntity; // read from cache
}
}
else
{
// cache ignored
if (rm.testFlag(CDbFlags::DbReading))
{
dbEntities |= currentEntity;
}
}
currentEntity = CEntityFlags::iterateDbEntities(allEntities);
}
// signals for the cached entities
this->emitReadSignalPerSingleCachedEntity(cachedEntities, true);
if (cachedEntities != CEntityFlags::NoEntity)
{
this->emitReadSignalPerSingleCachedEntity(cachedEntities, true);
}
// Real read from DB
this->startReadFromBackendInBackgroundThread(dbEntities, CDbFlags::DbReading, newerThan);
if (dbEntities != CEntityFlags::NoEntity)
{
this->startReadFromBackendInBackgroundThread(dbEntities, CDbFlags::DbReading, newerThan);
}
}
CEntityFlags::Entity CDatabaseReader::triggerLoadingDirectlyFromDb(CEntityFlags::Entity entities, const QDateTime &newerThan)