refs #720, finder by Telephony designator (aka callsign) and name

This commit is contained in:
Klaus Basan
2016-08-09 18:24:07 +02:00
committed by Mathew Sutcliffe
parent dbdea2d846
commit 009bfc3ed1
6 changed files with 63 additions and 21 deletions

View File

@@ -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; }