Move settings loading into factory method, since read should not be called

by DBus proxy.
This commit is contained in:
Roland Winklmeier
2014-06-15 20:24:40 +02:00
parent 8cbff262d1
commit 2e485a324c
2 changed files with 6 additions and 2 deletions

View File

@@ -16,7 +16,12 @@ namespace BlackCore
{
case CRuntimeConfig::Local:
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:
return new BlackCore::CContextSettingsProxy(BlackCore::CDBusServer::ServiceName, conn, mode, parent);
default: