mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 05:55:33 +08:00
refs #720, finder by Telephony designator (aka callsign) and name
This commit is contained in:
committed by
Mathew Sutcliffe
parent
dbdea2d846
commit
009bfc3ed1
@@ -125,6 +125,13 @@ namespace BlackMisc
|
||||
return this->matchesVDesignator(candidate) || this->matchesIataCode(candidate);
|
||||
}
|
||||
|
||||
bool CAirlineIcaoCode::matchesNamesOrTelephonyDesignator(const QString &candidate) const
|
||||
{
|
||||
const QString cand(candidate.toUpper().trimmed());
|
||||
if (this->getName().contains(cand, Qt::CaseInsensitive) || this->getTelephonyDesignator().contains(cand, Qt::CaseInsensitive)) { return true; }
|
||||
return this->isContainedInSimplifiedName(candidate);
|
||||
}
|
||||
|
||||
bool CAirlineIcaoCode::isContainedInSimplifiedName(const QString &candidate) const
|
||||
{
|
||||
if (candidate.isEmpty() || !this->hasName()) { return false; }
|
||||
|
||||
Reference in New Issue
Block a user