refs #644 Move initial settings load to CApplication::start.

This commit is contained in:
Mathew Sutcliffe
2016-04-27 18:30:28 +01:00
parent b8e2f10a0a
commit d7a63c15d4
2 changed files with 12 additions and 14 deletions

View File

@@ -81,15 +81,6 @@ namespace BlackCore
this->m_cookieManager.setParent(&this->m_accessManager);
this->m_accessManager.setCookieJar(&this->m_cookieManager);
// trigger loading of settings
//! \todo maybe loaded twice, context initializing might trigger loading of settings a second time
CStatusMessage m = CSettingsCache::instance()->loadFromStore();
if (!m.isEmpty())
{
m.setCategories(getLogCategories());
CLogMessage::preformatted(m);
}
// global setup
sApp = this;
this->m_setupReader.reset(new CSetupReader(this));
@@ -158,6 +149,18 @@ namespace BlackCore
}
bool s = this->startHookIn();
// trigger loading of settings in appropriate scenarios
if (this->m_coreFacadeConfig.getModeApplication() != CCoreFacadeConfig::Remote)
{
CStatusMessage m = CSettingsCache::instance()->loadFromStore();
if (!m.isEmpty())
{
m.setCategories(getLogCategories());
CLogMessage::preformatted(m);
}
}
if (waitForStart)
{
s = this->waitForStart();

View File

@@ -178,11 +178,6 @@ namespace BlackCore
Q_ASSERT(c);
}
// settings
if (this->getIContextApplication()) {
this->getIContextApplication()->loadSettings();
}
// times
times.insert("Post setup, sim.connects", time.restart());
}