Make sure listener does NOT restart when settings are updated, but DBus address did not change (set member correctly)

This commit is contained in:
Klaus Basan
2019-08-11 02:23:18 +02:00
committed by Mat Sutcliffe
parent add649c321
commit 741843d0c6
2 changed files with 8 additions and 8 deletions

View File

@@ -1302,14 +1302,14 @@ namespace BlackSimPlugin
if (this->isShuttingDown()) { return; }
Q_ASSERT_X(!CThreadUtils::isCurrentThreadApplicationThread(), Q_FUNC_INFO, "Expect to run in background");
const QString dbusAddress = m_xSwiftBusServerSettings.getThreadLocal().getDBusServerAddressQt();
if (CDBusServer::isSessionOrSystemAddress(dbusAddress))
m_dBusServerAddress = m_xSwiftBusServerSettings.getThreadLocal().getDBusServerAddressQt();
if (CDBusServer::isSessionOrSystemAddress(m_dBusServerAddress))
{
checkConnectionViaBus(dbusAddress);
checkConnectionViaBus(m_dBusServerAddress);
}
else if (CDBusServer::isQtDBusAddress(dbusAddress))
else if (CDBusServer::isQtDBusAddress(m_dBusServerAddress))
{
checkConnectionViaPeer(dbusAddress);
checkConnectionViaPeer(m_dBusServerAddress);
}
}