mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
refs #787, utility functions for shared files
* entity to shared file, shared file for DB Info * CUrl path function * removed redundant code in CDbInfo::getEntity() and fixed CEntityFlags::singleEntityByName
This commit is contained in:
@@ -144,12 +144,13 @@ namespace BlackMisc
|
||||
|
||||
CEntityFlags::Entity CEntityFlags::singleEntityByName(const QString &name)
|
||||
{
|
||||
// order here is crucial
|
||||
if (name.contains("model", Qt::CaseInsensitive)) { return ModelEntity; }
|
||||
if (name.contains("aircraft", Qt::CaseInsensitive)) { return AircraftIcaoEntity; }
|
||||
if (name.contains("airline", Qt::CaseInsensitive)) { return AirlineIcaoEntity; }
|
||||
if (name.contains("airport", Qt::CaseInsensitive)) { return AirportEntity; }
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user