Ref T298, better string handling/messages

This commit is contained in:
Klaus Basan
2018-08-07 19:45:30 +02:00
parent d310c9c843
commit 68607a3cb8
5 changed files with 51 additions and 50 deletions

View File

@@ -83,7 +83,7 @@ namespace BlackMisc
{
Q_UNUSED(i18n);
static const QString s("%1 %2 %3");
return s.arg(this->getDesignatorDbKey(), this->getCombinedType(), this->getWtc());
return s.arg(this->getDesignatorDbKey(), this->getCombinedType(), this->getWtc()).trimmed();
}
void CAircraftIcaoCode::updateMissingParts(const CAircraftIcaoCode &otherIcaoCode)

View File

@@ -90,10 +90,9 @@ namespace BlackMisc
QString CAirlineIcaoCode::getDesignatorNameCountry() const
{
QString s(this->getDesignator());
if (this->hasName()) { s = s.append(" ").append(this->getName()); }
if (this->hasValidCountry()) { s = s.append(" ").append(this->getCountryIso()); }
return s.trimmed();
return this->getDesignator() %
(this->hasName() ? (QStringLiteral(" ") % this->getName()) : QStringLiteral("")) %
(this->hasValidCountry() ? (QStringLiteral(" ") % this->getCountryIso()) : QStringLiteral(""));
}
QString CAirlineIcaoCode::getSimplifiedName() const