refs #797, added support for combined type

* adjusted log messages
* aligned name to combined type
This commit is contained in:
Klaus Basan
2016-11-29 23:13:30 +01:00
parent fc3ac8b323
commit 6befaa32d5
6 changed files with 55 additions and 24 deletions

View File

@@ -191,14 +191,14 @@ namespace BlackMisc
});
}
CAircraftModelList CAircraftModelList::findByCombinedCode(const QString &combinedCode) const
CAircraftModelList CAircraftModelList::findByCombinedType(const QString &combinedType) const
{
const QString cc(combinedCode.trimmed().toUpper());
if (combinedCode.length() != 3) { return CAircraftModelList(); }
const QString cc(combinedType.trimmed().toUpper());
if (combinedType.length() != 3) { return CAircraftModelList(); }
return this->findBy([ & ](const CAircraftModel & model)
{
const CAircraftIcaoCode icao(model.getAircraftIcaoCode());
return icao.matchesCombinedCode(cc);
return icao.matchesCombinedType(cc);
});
}