mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
Move settings loading into factory method, since read should not be called
by DBus proxy.
This commit is contained in:
@@ -342,7 +342,6 @@ namespace BlackCore
|
|||||||
|
|
||||||
// contexts
|
// contexts
|
||||||
this->m_contextSettings = IContextSettings::create(this, config.getModeSettings(), this->m_dbusServer, this->m_dbusConnection);
|
this->m_contextSettings = IContextSettings::create(this, config.getModeSettings(), this->m_dbusServer, this->m_dbusConnection);
|
||||||
this->m_contextSettings->read();
|
|
||||||
times.insert("Settings", time.restart());
|
times.insert("Settings", time.restart());
|
||||||
|
|
||||||
this->m_contextApplication = IContextApplication::create(this, config.getModeApplication(), this->m_dbusServer, this->m_dbusConnection);
|
this->m_contextApplication = IContextApplication::create(this, config.getModeApplication(), this->m_dbusServer, this->m_dbusConnection);
|
||||||
|
|||||||
@@ -16,7 +16,12 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
case CRuntimeConfig::Local:
|
case CRuntimeConfig::Local:
|
||||||
case CRuntimeConfig::LocalInDbusServer:
|
case CRuntimeConfig::LocalInDbusServer:
|
||||||
return (new CContextSettings(mode, parent))->registerWithDBus(server);
|
{
|
||||||
|
CContextSettings *contextSettings = new CContextSettings(mode, parent);
|
||||||
|
contextSettings->registerWithDBus(server);
|
||||||
|
contextSettings->read();
|
||||||
|
return contextSettings;
|
||||||
|
}
|
||||||
case CRuntimeConfig::Remote:
|
case CRuntimeConfig::Remote:
|
||||||
return new BlackCore::CContextSettingsProxy(BlackCore::CDBusServer::ServiceName, conn, mode, parent);
|
return new BlackCore::CContextSettingsProxy(BlackCore::CDBusServer::ServiceName, conn, mode, parent);
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user