Ref T472, further utility functions for category handling

This commit is contained in:
Klaus Basan
2019-03-09 02:05:07 +01:00
committed by Mat Sutcliffe
parent c899bfbea7
commit 54adb40329
8 changed files with 95 additions and 4 deletions

View File

@@ -216,7 +216,7 @@ namespace BlackMisc
this->removeIf(&CAircraftIcaoCode::isDbDuplicate, true);
}
QStringList CAircraftIcaoCodeList::toCompleterStrings(bool withIataCodes, bool withFamily, bool sort) const
QStringList CAircraftIcaoCodeList::toCompleterStrings(bool withIataCodes, bool withFamily, bool withCategory, bool sort) const
{
QStringList c;
CAircraftIcaoCodeList icaos(*this);
@@ -225,7 +225,7 @@ namespace BlackMisc
// 3 steps to get a proper sort order of the string list
for (const CAircraftIcaoCode &icao : as_const(icaos))
{
c.append(icao.getCombinedIcaoStringWithKey());
c.append(withCategory ? icao.getCombinedIcaoCategoryStringWithKey() : icao.getCombinedIcaoStringWithKey());
}
if (withFamily)