mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
refs #520 CDBusServer style/cleanup.
This commit is contained in:
@@ -58,7 +58,7 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, CSwiftCore::
|
||||
if (parser.isSet(helpOption)) { return CommandLineHelpRequested; }
|
||||
if (parser.isSet(versionOption)) { return CommandLineVersionRequested; }
|
||||
|
||||
setup->m_dbusAddress = CDBusServer::sessionDBusServer(); // default
|
||||
setup->m_dbusAddress = CDBusServer::sessionBusAddress(); // default
|
||||
if (parser.isSet("dbus"))
|
||||
{
|
||||
QString v(parser.value("dbus").trimmed().toLower());
|
||||
@@ -68,7 +68,7 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, CSwiftCore::
|
||||
}
|
||||
else if (v.contains("sys"))
|
||||
{
|
||||
setup->m_dbusAddress = CDBusServer::systemDBusServer(); // default
|
||||
setup->m_dbusAddress = CDBusServer::systemBusAddress(); // default
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,11 +60,11 @@ void CSwiftCore::initStyleSheet()
|
||||
|
||||
void CSwiftCore::initDBusMode(const CSwiftCore::SetupInfo &setup)
|
||||
{
|
||||
if (setup.m_dbusAddress.startsWith(CDBusServer::sessionDBusServer()))
|
||||
if (setup.m_dbusAddress.startsWith(CDBusServer::sessionBusAddress()))
|
||||
{
|
||||
this->ui->rb_SessionBus->setChecked(true);
|
||||
}
|
||||
else if (setup.m_dbusAddress.startsWith(CDBusServer::systemDBusServer()))
|
||||
else if (setup.m_dbusAddress.startsWith(CDBusServer::systemBusAddress()))
|
||||
{
|
||||
this->ui->rb_SystemBus->setChecked(true);
|
||||
}
|
||||
@@ -167,9 +167,9 @@ void CSwiftCore::stopCore()
|
||||
|
||||
QString CSwiftCore::getDBusAddress() const
|
||||
{
|
||||
if (ui->rb_SessionBus->isChecked()) { return CDBusServer::sessionDBusServer(); }
|
||||
if (ui->rb_SystemBus->isChecked()) { return CDBusServer::systemDBusServer(); }
|
||||
if (ui->rb_P2PBus->isChecked()) { return CDBusServer::fixAddressToDBusAddress(ui->le_P2PAddress->text()); }
|
||||
if (ui->rb_SessionBus->isChecked()) { return CDBusServer::sessionBusAddress(); }
|
||||
if (ui->rb_SystemBus->isChecked()) { return CDBusServer::systemBusAddress(); }
|
||||
if (ui->rb_P2PBus->isChecked()) { return CDBusServer::normalizeAddress(ui->le_P2PAddress->text()); }
|
||||
|
||||
Q_ASSERT_X(false, Q_FUNC_INFO, "Wrong DBus address");
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user