mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
refs #797, added support for combined type
* adjusted log messages * aligned name to combined type
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace BlackMisc
|
||||
CAircraftModelList findByFamily(const QString &family) const;
|
||||
|
||||
//! Find by combined code, wildcards possible e.g. L*P, *2J
|
||||
CAircraftModelList findByCombinedCode(const QString &combinedCode) const;
|
||||
CAircraftModelList findByCombinedType(const QString &combinedType) const;
|
||||
|
||||
//! Find by military flag
|
||||
CAircraftModelList findByMilitaryFlag(bool military) const;
|
||||
|
||||
Reference in New Issue
Block a user