refs #597, use CMD arguments in setup reader.

* Setup reader will now be initialized and handles by CApplication
* Setup reader no longer threaded reader as it will be initialized and loade upfront
This commit is contained in:
Klaus Basan
2016-02-18 19:56:35 +01:00
committed by Mathew Sutcliffe
parent 6a06aa0460
commit 9ff322ae25
8 changed files with 281 additions and 136 deletions

View File

@@ -43,6 +43,7 @@ namespace BlackCore
IndexSwiftDbFiles,
IndexBootstrap,
IndexUpdateInfo,
IndexWasLoaded,
IndexShared
};
@@ -52,6 +53,12 @@ namespace BlackCore
//! Destructor.
~CGlobalSetup() {}
//! Has data loaded from web
bool wasLoaded() const { return m_wasLoaded; }
//! Mark as loaded
void markAsLoaded(bool loaded) { this->m_wasLoaded = loaded; }
//! Http port
int dbHttpPort() const { return m_dbHttpPort; }
@@ -133,6 +140,7 @@ namespace BlackCore
private:
BLACK_ENABLE_TUPLE_CONVERSION(BlackCore::Data::CGlobalSetup)
bool m_wasLoaded = false; //!< Loaded from web
int m_dbHttpPort = 80; //!< port
int m_dbHttpsPort = 443; //!< SSL port
bool m_development = false; //!< dev. version?
@@ -167,6 +175,7 @@ namespace BlackCore
Q_DECLARE_METATYPE(BlackCore::Data::CGlobalSetup)
BLACK_DECLARE_TUPLE_CONVERSION(BlackCore::Data::CGlobalSetup, (
attr(o.m_wasLoaded),
attr(o.m_timestampMSecsSinceEpoch),
attr(o.m_dbRootDirectoryUrl),
attr(o.m_dbHttpPort),