mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
refs #520 CDBusServer style/cleanup.
This commit is contained in:
@@ -33,7 +33,7 @@ namespace BlackCore
|
||||
case CRuntimeConfig::LocalInDbusServer:
|
||||
return (new CContextApplication(mode, parent))->registerWithDBus(server);
|
||||
case CRuntimeConfig::Remote:
|
||||
return new BlackCore::CContextApplicationProxy(BlackMisc::CDBusServer::ServiceName(), connection, mode, parent);
|
||||
return new BlackCore::CContextApplicationProxy(BlackMisc::CDBusServer::coreServiceName(), connection, mode, parent);
|
||||
case CRuntimeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextApplicationEmpty(parent);
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace BlackCore
|
||||
case CRuntimeConfig::LocalInDbusServer:
|
||||
return (new CContextAudio(mode, runtime))->registerWithDBus(server);
|
||||
case CRuntimeConfig::Remote:
|
||||
return new CContextAudioProxy(BlackMisc::CDBusServer::ServiceName(), conn, mode, runtime);
|
||||
return new CContextAudioProxy(BlackMisc::CDBusServer::coreServiceName(), conn, mode, runtime);
|
||||
default:
|
||||
return new CContextAudioEmpty(runtime); // audio not mandatory
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace BlackCore
|
||||
case CRuntimeConfig::LocalInDbusServer:
|
||||
return (new CContextNetwork(mode, runtime))->registerWithDBus(server);
|
||||
case CRuntimeConfig::Remote:
|
||||
return new CContextNetworkProxy(BlackMisc::CDBusServer::ServiceName(), connection, mode, runtime);
|
||||
return new CContextNetworkProxy(BlackMisc::CDBusServer::coreServiceName(), connection, mode, runtime);
|
||||
case CRuntimeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextNetworkEmpty(runtime);
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace BlackCore
|
||||
case CRuntimeConfig::LocalInDbusServer:
|
||||
return (new CContextOwnAircraft(mode, parent))->registerWithDBus(server);
|
||||
case CRuntimeConfig::Remote:
|
||||
return new CContextOwnAircraftProxy(BlackMisc::CDBusServer::ServiceName(), conn, mode, parent);
|
||||
return new CContextOwnAircraftProxy(BlackMisc::CDBusServer::coreServiceName(), conn, mode, parent);
|
||||
case CRuntimeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextOwnAircraftEmpty(parent);
|
||||
|
||||
@@ -212,7 +212,7 @@ namespace BlackCore
|
||||
disconnect(this);
|
||||
|
||||
// unregister all from DBus
|
||||
if (this->m_dbusServer) { this->m_dbusServer->unregisterAllObjects(); }
|
||||
if (this->m_dbusServer) { this->m_dbusServer->removeAllObjects(); }
|
||||
|
||||
// handle contexts
|
||||
if (this->getIContextSimulator())
|
||||
@@ -272,11 +272,11 @@ namespace BlackCore
|
||||
void CRuntime::initDBusConnection(const QString &address)
|
||||
{
|
||||
if (this->m_initDBusConnection) { return; }
|
||||
if (address.isEmpty() || address == CDBusServer::sessionDBusServer())
|
||||
if (address.isEmpty() || address == CDBusServer::sessionBusAddress())
|
||||
{
|
||||
this->m_dbusConnection = QDBusConnection::sessionBus();
|
||||
}
|
||||
else if (address == CDBusServer::systemDBusServer())
|
||||
else if (address == CDBusServer::systemBusAddress())
|
||||
{
|
||||
this->m_dbusConnection = QDBusConnection::sessionBus();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace BlackCore
|
||||
case CRuntimeConfig::LocalInDbusServer:
|
||||
return (new CContextSimulator(mode, parent))->registerWithDBus(server);
|
||||
case CRuntimeConfig::Remote:
|
||||
return new CContextSimulatorProxy(BlackMisc::CDBusServer::ServiceName(), conn, mode, parent);
|
||||
return new CContextSimulatorProxy(BlackMisc::CDBusServer::coreServiceName(), conn, mode, parent);
|
||||
case CRuntimeConfig::NotUsed:
|
||||
default:
|
||||
return new CContextSimulatorEmpty(parent);
|
||||
|
||||
Reference in New Issue
Block a user