mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
refs #644 Move initial settings load to CApplication::start.
This commit is contained in:
@@ -81,15 +81,6 @@ namespace BlackCore
|
|||||||
this->m_cookieManager.setParent(&this->m_accessManager);
|
this->m_cookieManager.setParent(&this->m_accessManager);
|
||||||
this->m_accessManager.setCookieJar(&this->m_cookieManager);
|
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
|
// global setup
|
||||||
sApp = this;
|
sApp = this;
|
||||||
this->m_setupReader.reset(new CSetupReader(this));
|
this->m_setupReader.reset(new CSetupReader(this));
|
||||||
@@ -158,6 +149,18 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool s = this->startHookIn();
|
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)
|
if (waitForStart)
|
||||||
{
|
{
|
||||||
s = this->waitForStart();
|
s = this->waitForStart();
|
||||||
|
|||||||
@@ -178,11 +178,6 @@ namespace BlackCore
|
|||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
// settings
|
|
||||||
if (this->getIContextApplication()) {
|
|
||||||
this->getIContextApplication()->loadSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
// times
|
// times
|
||||||
times.insert("Post setup, sim.connects", time.restart());
|
times.insert("Post setup, sim.connects", time.restart());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user