mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
refs #535 completer for airline name
* common base class for airline completers * changed dependend classes
This commit is contained in:
@@ -60,16 +60,30 @@ namespace BlackMisc
|
||||
return codes;
|
||||
}
|
||||
|
||||
QStringList CAirlineIcaoCodeList::toCompleterStrings() const
|
||||
QStringList CAirlineIcaoCodeList::toIcaoDesignatorCompleterStrings() const
|
||||
{
|
||||
QStringList c;
|
||||
for (const CAirlineIcaoCode &icao : *this)
|
||||
{
|
||||
QString cs(icao.getCombinedStringWithKey());
|
||||
if (!icao.hasValidDbKey()) { continue; }
|
||||
const QString cs(icao.getCombinedStringWithKey());
|
||||
if (cs.isEmpty()) { continue; }
|
||||
c.append(cs);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
QStringList CAirlineIcaoCodeList::toNameCompleterStrings() const
|
||||
{
|
||||
QStringList c;
|
||||
for (const CAirlineIcaoCode &icao : *this)
|
||||
{
|
||||
if (!icao.hasValidDbKey()) { continue; }
|
||||
const QString cs(icao.getNameWithKey());
|
||||
if (cs.isEmpty()) { continue; }
|
||||
c.append(cs);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user