mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
refs #748, fixed airport JSON bugs and removed workaround
* removed workaround in web data services * removed convertFromDatabaseJson functions, not needed * changed to use the correct static fromDatabaseJson functions * fixed prefixes * load correct Country object by loading it as nested object * key and timestamp was missing in CAirport tuple metadata
This commit is contained in:
@@ -60,16 +60,15 @@ namespace BlackMisc
|
||||
return icaos;
|
||||
}
|
||||
|
||||
void CAirportList::convertFromDatabaseJson(const QJsonArray &json)
|
||||
CAirportList CAirportList::fromDatabaseJson(const QJsonArray &array)
|
||||
{
|
||||
clear();
|
||||
for (const QJsonValue &value : json)
|
||||
CAirportList airports;
|
||||
for (const QJsonValue &value : array)
|
||||
{
|
||||
QJsonObject object = value.toObject();
|
||||
CAirport airport;
|
||||
airport.convertFromDatabaseJson(object);
|
||||
push_back(airport);
|
||||
const CAirport airport(CAirport::fromDatabaseJson(value.toObject()));
|
||||
airports.push_back(airport);
|
||||
}
|
||||
return airports;
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user