mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Style
This commit is contained in:
committed by
Roland Winklmeier
parent
45f48f7594
commit
9d37a0876d
@@ -245,12 +245,12 @@ namespace BlackCore
|
||||
Q_ASSERT(this->getIContextApplication());
|
||||
Q_ASSERT(this->getIContextApplication()->isUsingImplementingObject());
|
||||
|
||||
if (this->m_simulator && this->m_simulator->getSimulatorInfo() == simulatorInfo) { return true; } // already loaded
|
||||
if (simulatorInfo.isUnspecified()) { return false; }
|
||||
if (this->m_simulator && this->m_simulator->getSimulatorInfo() == simulatorInfo) {
|
||||
return true;
|
||||
} // already loaded
|
||||
|
||||
// warning if we do not have any plugins
|
||||
if (m_simulatorFactories.isEmpty())
|
||||
{
|
||||
if (m_simulatorFactories.isEmpty()) {
|
||||
CLogMessage(this).error("No simulator plugins");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -116,9 +116,7 @@ namespace BlackGui
|
||||
{
|
||||
int intervalMs = getUpdateIntervalMs();
|
||||
this->m_updateTimer->startTimer(intervalMs);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
this->stopTimer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,12 +154,15 @@ namespace BlackSimPlugin
|
||||
|
||||
bool CSimulatorXPlane::connectTo()
|
||||
{
|
||||
if (isConnected()) { return true; }
|
||||
if (isConnected()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
m_conn = QDBusConnection::sessionBus(); // TODO make this configurable
|
||||
m_service = new CXBusServiceProxy(m_conn, this);
|
||||
m_traffic = new CXBusTrafficProxy(m_conn, this);
|
||||
if (m_service->isValid() && m_traffic->isValid() && m_traffic->initialize())
|
||||
{
|
||||
|
||||
if (m_service->isValid() && m_traffic->isValid() && m_traffic->initialize()) {
|
||||
// FIXME duplication
|
||||
connect(m_service, &CXBusServiceProxy::aircraftModelChanged, this, &CSimulatorXPlane::ps_emitOwnAircraftModelChanged);
|
||||
connect(m_service, &CXBusServiceProxy::airportsInRangeUpdated, this, &CSimulatorXPlane::ps_setAirportsInRange);
|
||||
@@ -167,9 +170,7 @@ namespace BlackSimPlugin
|
||||
m_watcher->setConnection(m_conn);
|
||||
emitSimulatorCombinedStatus();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
disconnectFrom();
|
||||
return false;
|
||||
}
|
||||
@@ -183,8 +184,7 @@ namespace BlackSimPlugin
|
||||
|
||||
bool CSimulatorXPlane::disconnectFrom()
|
||||
{
|
||||
if (m_traffic)
|
||||
{
|
||||
if (m_traffic) {
|
||||
m_traffic->cleanup();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user