mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
[DB readers] misc fixes found during "datastore down" investigation
* added CEntityFlags::AircraftCategoryEntity in config lists * flag to name * missed initial reading of categories * style
This commit is contained in:
committed by
Mat Sutcliffe
parent
39907bf7ea
commit
0482b9883d
@@ -26,11 +26,13 @@ namespace BlackMisc
|
||||
switch (flag)
|
||||
{
|
||||
case Unspecified: return "Unspecified";
|
||||
case Ignore: return "Ignore";
|
||||
case Canceled: return "Canceled";
|
||||
case DbReading: return "Direct DB access";
|
||||
case Shared: return "Shared data";
|
||||
case Cached: return "Cached data";
|
||||
case Ignore: return "Ignore";
|
||||
case Canceled: return "Canceled";
|
||||
case DbReading: return "Direct DB access";
|
||||
case DbWriting: return "DB writing";
|
||||
case Shared: return "Shared data";
|
||||
case SharedInfoOnly: return "Shared info only";
|
||||
case Cached: return "Cached data";
|
||||
default:
|
||||
BLACK_VERIFY_X(false, Q_FUNC_INFO, "wrong flags");
|
||||
return "wrong flags";
|
||||
@@ -41,25 +43,27 @@ namespace BlackMisc
|
||||
{
|
||||
QStringList list;
|
||||
if (mode.testFlag(Unspecified)) list << "Unspecified";
|
||||
if (mode.testFlag(Canceled)) list << "Canceled";
|
||||
if (mode.testFlag(Ignore)) list << "Ignore";
|
||||
if (mode.testFlag(Canceled)) list << "Canceled";
|
||||
if (mode.testFlag(Ignore)) list << "Ignore";
|
||||
|
||||
if (mode.testFlag(DbReading)) list << "Direct DB access";
|
||||
if (mode.testFlag(Shared)) list << "Shared data";
|
||||
if (mode.testFlag(Cached)) list << "Cached data";
|
||||
if (mode.testFlag(DbReading)) list << "Direct DB access";
|
||||
if (mode.testFlag(DbWriting)) list << "DB writing";
|
||||
if (mode.testFlag(Shared)) list << "Shared data";
|
||||
if (mode.testFlag(SharedInfoOnly)) list << "Shared info only";
|
||||
if (mode.testFlag(Cached)) list << "Cached data";
|
||||
return list.join(", ");
|
||||
}
|
||||
|
||||
CDbFlags::DataRetrievalModeFlag CDbFlags::modeToModeFlag(DataRetrievalMode mode)
|
||||
{
|
||||
if (mode == Unspecified) return Unspecified;
|
||||
if (mode == DbReading) return DbReading;
|
||||
if (mode == DbWriting) return DbWriting;
|
||||
if (mode == Shared) return Shared;
|
||||
if (mode == DbReading) return DbReading;
|
||||
if (mode == DbWriting) return DbWriting;
|
||||
if (mode == Shared) return Shared;
|
||||
if (mode == SharedInfoOnly) return SharedInfoOnly;
|
||||
if (mode == Cached) return Cached;
|
||||
if (mode == Canceled) return Canceled;
|
||||
if (mode == Ignore) return Ignore;
|
||||
if (mode == Cached) return Cached;
|
||||
if (mode == Canceled) return Canceled;
|
||||
if (mode == Ignore) return Ignore;
|
||||
return Unspecified;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user