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:
Klaus Basan
2016-10-18 04:35:24 +02:00
parent 34d74904ff
commit b8d323226f
8 changed files with 39 additions and 73 deletions

View File

@@ -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