refs #768, fixed reverse lookup on login page (model changes in SIM are reflected here)

* use reverse lookup function
* complete model when web services have read the DB data (before that no reverse lookup is possible)
* use new model changed signature

Remark: Temp adjustement when signal allSwiftDbDataRead is sent. As soon #748 is ready needs to be changed to include airport entities
This commit is contained in:
Klaus Basan
2016-10-06 21:36:03 +02:00
committed by Mathew Sutcliffe
parent cda3ece82b
commit 74173a734e
6 changed files with 32 additions and 22 deletions

View File

@@ -754,8 +754,9 @@ namespace BlackCore
CLogMessage(cats).info("Read data %1 entries: %2 state: %3") << CEntityFlags::flagToString(entity) << number << CEntityFlags::flagToString(state);
}
this->m_swiftDbEntitiesReaad |= entity;
if (this->m_swiftDbEntitiesReaad == CEntityFlags::AllDbEntitiesNoInfoObjects || this->m_swiftDbEntitiesReaad == CEntityFlags::AllDbEntities)
//! \todo adjust value when airports are ready
this->m_swiftDbEntitiesRead |= entity;
if (((static_cast<int>(this->m_swiftDbEntitiesRead)) & static_cast<int>(CEntityFlags::AllDbEntitiesNoInfoObjectsNoAirports)) > 0)
{
emit allSwiftDbDataRead();
}

View File

@@ -381,7 +381,7 @@ namespace BlackCore
CWebReaderFlags::WebReader m_readers = CWebReaderFlags::WebReaderFlag::None; //!< which readers are available
BlackCore::Db::CDatabaseReaderConfigList m_dbReaderConfig; //!< how to read DB data
BlackMisc::Network::CEntityFlags::Entity m_entitiesPeriodicallyRead = BlackMisc::Network::CEntityFlags::NoEntity; //!< those entities which are permanently updated by timers
BlackMisc::Network::CEntityFlags::Entity m_swiftDbEntitiesReaad = BlackMisc::Network::CEntityFlags::NoEntity; //!< entities read
BlackMisc::Network::CEntityFlags::Entity m_swiftDbEntitiesRead = BlackMisc::Network::CEntityFlags::NoEntity; //!< entities read
bool m_initialRead = false; //!< Initial read started
int m_infoObjectTrials = 0; //!< Tried to read info objects