mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #709, name to entity
This commit is contained in:
@@ -134,10 +134,21 @@ namespace BlackMisc
|
||||
{
|
||||
return
|
||||
entities.testFlag(AircraftIcaoEntity) || entities.testFlag(AirlineIcaoEntity) ||
|
||||
entities.testFlag(CountryEntity) ||
|
||||
entities.testFlag(CountryEntity) || entities.testFlag(DistributorEntity) ||
|
||||
entities.testFlag(ModelEntity) || entities.testFlag(LiveryEntity);
|
||||
}
|
||||
|
||||
CEntityFlags::Entity CEntityFlags::singleEntityByName(const QString &name)
|
||||
{
|
||||
if (name.contains("aircraft", Qt::CaseInsensitive)) { return AircraftIcaoEntity; }
|
||||
if (name.contains("airline", Qt::CaseInsensitive)) { return AirlineIcaoEntity; }
|
||||
if (name.contains("distributor", Qt::CaseInsensitive)) { return DistributorEntity; }
|
||||
if (name.contains("countr", Qt::CaseInsensitive)) { return CountryEntity; }
|
||||
if (name.contains("model", Qt::CaseInsensitive)) { return ModelEntity; }
|
||||
if (name.contains("liver", Qt::CaseInsensitive)) { return LiveryEntity; }
|
||||
return NoEntity;
|
||||
}
|
||||
|
||||
void CEntityFlags::registerMetadata()
|
||||
{
|
||||
// this is no value class and I register enums here,
|
||||
|
||||
Reference in New Issue
Block a user