refs #649, added check for changed base URL to database reader

(continued #649 after fixes of #664)
This commit is contained in:
Klaus Basan
2016-05-27 17:55:19 +02:00
parent 8ad640704c
commit 467f37db7f
11 changed files with 59 additions and 9 deletions

View File

@@ -263,6 +263,7 @@ namespace BlackCore
}
this->m_airlineIcaoCache.set(codes, latestTimestamp);
this->updateReaderUrl(this->getBaseUrl());
emit dataRead(CEntityFlags::AirlineIcaoEntity, CEntityFlags::ReadFinished, n);
CLogMessage(this).info("Read %1 %2 from %3") << n << CEntityFlags::flagToString(CEntityFlags::AirlineIcaoEntity) << urlString;
}
@@ -288,6 +289,7 @@ namespace BlackCore
}
this->m_countryCache.set(countries, latestTimestamp);
this->updateReaderUrl(this->getBaseUrl());
emit dataRead(CEntityFlags::CountryEntity, CEntityFlags::ReadFinished, n);
CLogMessage(this).info("Read %1 %2 from %3") << n << CEntityFlags::flagToString(CEntityFlags::CountryEntity) << urlString;
}
@@ -408,6 +410,12 @@ namespace BlackCore
}
}
bool CIcaoDataReader::hasChangedUrl(CEntityFlags::Entity entity) const
{
Q_UNUSED(entity);
return CDatabaseReader::isChangedUrl(this->m_readerUrlCache.getCopy(), this->getBaseUrl());
}
CUrl CIcaoDataReader::getAircraftIcaoUrl(bool shared) const
{
return shared ?