mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
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:
committed by
Mathew Sutcliffe
parent
6a06aa0460
commit
9ff322ae25
@@ -122,6 +122,11 @@ namespace BlackCore
|
||||
QString s("timestamp: ");
|
||||
s.append(this->getFormattedUtcTimestampYmdhms());
|
||||
s.append(separator);
|
||||
|
||||
s.append("Loaded: ");
|
||||
s.append(boolToYesNo(this->wasLoaded()));
|
||||
s.append(separator);
|
||||
|
||||
s.append("For development: ");
|
||||
s.append(boolToYesNo(isDevelopment()));
|
||||
s.append(separator);
|
||||
@@ -200,6 +205,8 @@ namespace BlackCore
|
||||
return CVariant::fromValue(this->swiftDbDataFileLocationUrls());
|
||||
case IndexShared:
|
||||
return CVariant::fromValue(this->m_sharedUrls);
|
||||
case IndexWasLoaded:
|
||||
return CVariant::fromValue(this->m_wasLoaded);
|
||||
default:
|
||||
return CValueObject::propertyByIndex(index);
|
||||
}
|
||||
@@ -240,6 +247,9 @@ namespace BlackCore
|
||||
case IndexShared:
|
||||
this->m_sharedUrls = variant.value<CUrlList>();
|
||||
break;
|
||||
case IndexWasLoaded:
|
||||
this->m_wasLoaded = variant.toBool();
|
||||
break;
|
||||
default:
|
||||
CValueObject::setPropertyByIndex(variant, index);
|
||||
break;
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user