mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
Some Web readers adjustemnts
* do not init shared URLs before needed * do not load info objects when DB is unavailable * adjust reader flags when DB is down * airport URL available in setup
This commit is contained in:
@@ -40,12 +40,24 @@ namespace BlackMisc
|
||||
{
|
||||
QStringList list;
|
||||
if (mode.testFlag(Unspecified)) list << "Unspecified";
|
||||
if (mode.testFlag(Canceled)) list << "Unspecified";
|
||||
|
||||
if (mode.testFlag(DbDirect)) list << "Direct DB access";
|
||||
if (mode.testFlag(Shared)) list << "Shared data";
|
||||
if (mode.testFlag(Cached)) list << "Cached data";
|
||||
return list.join(',');
|
||||
}
|
||||
|
||||
CDbFlags::DataRetrievalMode CDbFlags::adjustWhenDbIsDown(DataRetrievalMode mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case DbDirect: return Canceled;
|
||||
case CacheThenDb: return Cached;
|
||||
default: return mode;
|
||||
}
|
||||
}
|
||||
|
||||
void CDbFlags::registerMetadata()
|
||||
{
|
||||
// this is no value class and I register enums here,
|
||||
|
||||
Reference in New Issue
Block a user