refs #535 completer for airline name

* common base class for airline completers
* changed dependend classes
This commit is contained in:
Klaus Basan
2015-12-14 03:18:55 +01:00
parent 2c84c51a93
commit 92f930b068
13 changed files with 545 additions and 211 deletions

View File

@@ -210,6 +210,19 @@ namespace BlackMisc
return s.append(" ").append(getDbKeyAsStringInParentheses());
}
QString CAirlineIcaoCode::getNameWithKey() const
{
if (!hasValidDbKey()) { return getName(); }
if (hasName())
{
return QString(getName()).append(" ").append(getDbKeyAsStringInParentheses());
}
else
{
return getDbKeyAsStringInParentheses();
}
}
void CAirlineIcaoCode::updateMissingParts(const CAirlineIcaoCode &otherIcaoCode)
{
if (!this->hasValidDesignator()) { this->setDesignator(otherIcaoCode.getDesignator()); }