mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-11 23:05:34 +08:00
refs #709, as result of testing created special database views for ICAO codes
* view already filter incomplete data * as result, info object count values are aligned with data eventually parsed (which will allow to detect changes by comparing counts) * smaller adjustments to allow airlines with designator
This commit is contained in:
@@ -223,7 +223,7 @@ namespace BlackCore
|
||||
QScopedPointer<QNetworkReply, QScopedPointerDeleteLater> nwReply(nwReplyPtr);
|
||||
if (this->isAbandoned()) { return; }
|
||||
|
||||
QString urlString(nwReply->url().toString());
|
||||
const QString urlString(nwReply->url().toString());
|
||||
CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data());
|
||||
if (res.hasErrorMessage())
|
||||
{
|
||||
@@ -231,7 +231,9 @@ namespace BlackCore
|
||||
emit dataRead(CEntityFlags::AircraftIcaoEntity, CEntityFlags::ReadFailed, 0);
|
||||
return;
|
||||
}
|
||||
const CAircraftIcaoCodeList codes = CAircraftIcaoCodeList::fromDatabaseJson(res);
|
||||
|
||||
// normally read from special view which already filter incomplete
|
||||
const CAircraftIcaoCodeList codes = CAircraftIcaoCodeList::fromDatabaseJson(res, false);
|
||||
const int n = codes.size();
|
||||
qint64 latestTimestamp = codes.latestTimestampMsecsSinceEpoch();
|
||||
if (n > 0 && latestTimestamp < 0)
|
||||
@@ -259,7 +261,7 @@ namespace BlackCore
|
||||
emit dataRead(CEntityFlags::AirlineIcaoEntity, CEntityFlags::ReadFailed, 0);
|
||||
return;
|
||||
}
|
||||
const CAirlineIcaoCodeList codes = CAirlineIcaoCodeList::fromDatabaseJson(res);
|
||||
const CAirlineIcaoCodeList codes = CAirlineIcaoCodeList::fromDatabaseJson(res, false);
|
||||
const int n = codes.size();
|
||||
qint64 latestTimestamp = codes.latestTimestampMsecsSinceEpoch();
|
||||
if (n > 0 && latestTimestamp < 0)
|
||||
|
||||
Reference in New Issue
Block a user