mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Fix possible memleak in CDatabaseWriter
* CApplication network methods cleanup
This commit is contained in:
@@ -52,13 +52,16 @@ namespace BlackMisc
|
||||
(void)QT_TRANSLATE_NOOP("Aviation", "Airport");
|
||||
}
|
||||
|
||||
void CAirport::fromDatabaseJson(const QJsonObject &json)
|
||||
void CAirport::convertFromDatabaseJson(const QJsonObject &json)
|
||||
{
|
||||
Q_ASSERT(json.value("icao").isString());
|
||||
setIcao(json.value("icao").toString());
|
||||
|
||||
Q_ASSERT(json.value("country").isString());
|
||||
setCountry(json.value("country").toString());
|
||||
if (json.value("alpha3").isString() && json.value("country").isString())
|
||||
{
|
||||
CCountry country(json.value("alpha3").toString(), json.value("country").toString());
|
||||
setCountry(country);
|
||||
}
|
||||
|
||||
Q_ASSERT(json.value("name").isString());
|
||||
setDescriptiveName(json.value("name").toString());
|
||||
|
||||
Reference in New Issue
Block a user