mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
refs #748, further airport from DB follow up fixes
* Ignore mode, not all applications need to load everything (mapping tool no airports) * removed signal in airport reader which is already in base class * added "virtual" keyword * fixed another syncronize typo * added allDbEntiiesUsed() to also reflect the config (ignore flag) * ensure allSwiftDbData are signaled correctly even with ignore flag
This commit is contained in:
@@ -27,6 +27,8 @@ namespace BlackMisc
|
||||
switch (flag)
|
||||
{
|
||||
case Unspecified: return "Unspecified";
|
||||
case Ignore: return "Ignore";
|
||||
case Canceled: return "Canceled";
|
||||
case DbDirect: return "Direct DB access";
|
||||
case Shared: return "Shared data";
|
||||
case Cached: return "Cached data";
|
||||
@@ -40,7 +42,8 @@ namespace BlackMisc
|
||||
{
|
||||
QStringList list;
|
||||
if (mode.testFlag(Unspecified)) list << "Unspecified";
|
||||
if (mode.testFlag(Canceled)) list << "Unspecified";
|
||||
if (mode.testFlag(Canceled)) list << "Canceled";
|
||||
if (mode.testFlag(Ignore)) list << "Ignore";
|
||||
|
||||
if (mode.testFlag(DbDirect)) list << "Direct DB access";
|
||||
if (mode.testFlag(Shared)) list << "Shared data";
|
||||
|
||||
@@ -35,7 +35,8 @@ namespace BlackMisc
|
||||
DbDirect = 1 << 0, //!< directly from DB
|
||||
Shared = 1 << 1, //!< shared directory
|
||||
Cached = 1 << 2, //!< from cache
|
||||
Canceled = 1 << 3, //!< cancel DB reading
|
||||
Canceled = 1 << 3, //!< canceled DB reading
|
||||
Ignore = 1 << 4, //!< ignore this entity
|
||||
CacheThenDb = DbDirect | Cached, //!< Cache when possible, otherwise DB
|
||||
CacheThenShared = Shared | Cached //!< Cache when possible, otherwise shared
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace BlackMisc
|
||||
{
|
||||
case AircraftIcaoEntity: return "Aircraft ICAO";
|
||||
case AirlineIcaoEntity: return "Airline ICAO";
|
||||
case AirportEntity: return "Airport";
|
||||
case AllEntities: return "All";
|
||||
case AllIcaoAndCountries: return "All ICAO + country";
|
||||
case AllIcaoEntities: return "All ICAO";
|
||||
@@ -36,7 +37,6 @@ namespace BlackMisc
|
||||
case NoEntity: return "no data";
|
||||
case VatsimDataFile: return "VATSIM data file";
|
||||
case VatsimStatusFile: return "VATSIM status file";
|
||||
case AirportEntity: return "Airport";
|
||||
default:
|
||||
BLACK_VERIFY_X(false, Q_FUNC_INFO, "wrong flags");
|
||||
return "wrong flags";
|
||||
@@ -48,6 +48,7 @@ namespace BlackMisc
|
||||
QStringList list;
|
||||
if (flag.testFlag(AircraftIcaoEntity)) list << "Aircraft ICAO";
|
||||
if (flag.testFlag(AirlineIcaoEntity)) list << "Airline ICAO";
|
||||
if (flag.testFlag(AirportEntity)) list << "Airport";
|
||||
if (flag.testFlag(BookingEntity)) list << "VATSIM bookings";
|
||||
if (flag.testFlag(CountryEntity)) list << "Country";
|
||||
if (flag.testFlag(DistributorEntity)) list << "Distributor";
|
||||
@@ -57,7 +58,6 @@ namespace BlackMisc
|
||||
if (flag.testFlag(NoEntity)) list << "no data";
|
||||
if (flag.testFlag(VatsimDataFile)) list << "VATSIM data file";
|
||||
if (flag.testFlag(VatsimStatusFile)) list << "VATSIM status file";
|
||||
if (flag.testFlag(AirportEntity)) list << "Airport";
|
||||
return list.join(',');
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@ namespace BlackMisc
|
||||
if (entities == NoEntity || entities == InfoObjectEntity) { return NoEntity; }
|
||||
if (entities.testFlag(AircraftIcaoEntity)) { entities &= ~AircraftIcaoEntity; return AircraftIcaoEntity; }
|
||||
if (entities.testFlag(AirlineIcaoEntity)) { entities &= ~AirlineIcaoEntity; return AirlineIcaoEntity; }
|
||||
if (entities.testFlag(AirportEntity)) { entities &= ~AirportEntity; return AirportEntity; }
|
||||
if (entities.testFlag(LiveryEntity)) { entities &= ~LiveryEntity; return LiveryEntity; }
|
||||
if (entities.testFlag(CountryEntity)) { entities &= ~CountryEntity; return CountryEntity; }
|
||||
if (entities.testFlag(ModelEntity)) { entities &= ~ModelEntity; return ModelEntity; }
|
||||
|
||||
Reference in New Issue
Block a user