Ref T118, allow to just provide an id (from backend) and set the entity on swift side

* added getDistributorForDbKey
* added fillInMissingAircraftAndLiveryEntities
* fromDbJson function adjusted
This commit is contained in:
Klaus Basan
2017-10-25 17:05:11 +02:00
parent 585d82f84b
commit 4166982954
8 changed files with 95 additions and 3 deletions

View File

@@ -85,6 +85,13 @@ namespace BlackCore
return m_distributorCache.get();
}
CDistributor CModelDataReader::getDistributorForDbKey(const QString &dbKey) const
{
if (dbKey.isEmpty()) { return CDistributor(); }
const CDistributorList distributors(getDistributors());
return distributors.findByKeyOrAlias(dbKey);
}
CAircraftModelList CModelDataReader::getModels() const
{
return m_modelCache.get();