mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
Ref T26, Ref T27, utility functions in "value object" classes
This commit is contained in:
@@ -252,6 +252,23 @@ namespace BlackMisc
|
||||
return combined.join(", ");
|
||||
}
|
||||
|
||||
bool CAircraftIcaoCode::matchesAnyDescription(const QString &candidate) const
|
||||
{
|
||||
if (this->hasModelDescription())
|
||||
{
|
||||
if (this->getModelDescription().contains(candidate, Qt::CaseInsensitive)) { return true; }
|
||||
}
|
||||
if (this->hasModelIataDescription())
|
||||
{
|
||||
if (this->getModelIataDescription().contains(candidate, Qt::CaseInsensitive)) { return true; }
|
||||
}
|
||||
if (this->hasModelSwiftDescription())
|
||||
{
|
||||
if (this->getModelSwiftDescription().contains(candidate, Qt::CaseInsensitive)) { return true; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CAircraftIcaoCode::matchesCombinedType(const QString &combinedType) const
|
||||
{
|
||||
const QString cc(combinedType.toUpper().trimmed().replace(' ', '*').replace('-', '*'));
|
||||
|
||||
Reference in New Issue
Block a user