mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
* adjustments to use deferred caches * removed simulator from CAircraftModelSetLoader`s signature as it was not used * only change current simulator when explicitly set (avoid unintended setting) * added function to obtain number of elements from model caches
This commit is contained in:
@@ -399,7 +399,7 @@ namespace BlackCore
|
||||
if (entities.testFlag(CEntityFlags::CountryEntity)) {CDataCache::instance()->clearAllValues(this->m_countryCache.getKey()); }
|
||||
}
|
||||
|
||||
QDateTime CIcaoDataReader::getCacheTimestamp(CEntityFlags::Entity entity)
|
||||
QDateTime CIcaoDataReader::getCacheTimestamp(CEntityFlags::Entity entity) const
|
||||
{
|
||||
switch (entity)
|
||||
{
|
||||
@@ -410,6 +410,17 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
int CIcaoDataReader::getCacheCount(CEntityFlags::Entity entity) const
|
||||
{
|
||||
switch (entity)
|
||||
{
|
||||
case CEntityFlags::AircraftIcaoEntity: return this->m_aircraftIcaoCache.getCopy().size();
|
||||
case CEntityFlags::AirlineIcaoEntity: return this->m_airlineIcaoCache.getCopy().size();
|
||||
case CEntityFlags::CountryEntity: return this->m_countryCache.getCopy().size();
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool CIcaoDataReader::hasChangedUrl(CEntityFlags::Entity entity) const
|
||||
{
|
||||
Q_UNUSED(entity);
|
||||
|
||||
Reference in New Issue
Block a user