mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 12:55:31 +08:00
Ref T566, style
This commit is contained in:
committed by
Mat Sutcliffe
parent
28b6f484e4
commit
b2065b5da3
@@ -72,7 +72,7 @@ namespace BlackCore
|
|||||||
m_analyzer(new CAirspaceAnalyzer(ownAircraftProvider, network, this))
|
m_analyzer(new CAirspaceAnalyzer(ownAircraftProvider, network, this))
|
||||||
{
|
{
|
||||||
this->setObjectName("CAirspaceMonitor");
|
this->setObjectName("CAirspaceMonitor");
|
||||||
this->enableReverseLookupMessages(sApp->isDeveloperFlagSet());
|
this->enableReverseLookupMessages(sApp->isDeveloperFlagSet() || CBuildConfig::isLocalDeveloperDebugBuild() ? RevLogEnabled : RevLogEnabledSimplified);
|
||||||
|
|
||||||
connect(m_network, &INetwork::atcPositionUpdate, this, &CAirspaceMonitor::onAtcPositionUpdate);
|
connect(m_network, &INetwork::atcPositionUpdate, this, &CAirspaceMonitor::onAtcPositionUpdate);
|
||||||
connect(m_network, &INetwork::atisReplyReceived, this, &CAirspaceMonitor::onAtisReceived);
|
connect(m_network, &INetwork::atisReplyReceived, this, &CAirspaceMonitor::onAtisReceived);
|
||||||
@@ -325,7 +325,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
void CAirspaceMonitor::requestAtcBookingsUpdate()
|
void CAirspaceMonitor::requestAtcBookingsUpdate()
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(sApp && sApp->getWebDataServices(), Q_FUNC_INFO, "missing reader");
|
if (!sApp || sApp->isShuttingDown()) { return; }
|
||||||
sApp->getWebDataServices()->readInBackground(BlackMisc::Network::CEntityFlags::BookingEntity);
|
sApp->getWebDataServices()->readInBackground(BlackMisc::Network::CEntityFlags::BookingEntity);
|
||||||
m_bookingsRequested = true;
|
m_bookingsRequested = true;
|
||||||
}
|
}
|
||||||
@@ -395,7 +395,7 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Client
|
// Client
|
||||||
if (!sApp || !sApp->getWebDataServices()) { return; }
|
if (!sApp || sApp->isShuttingDown() || !sApp->getWebDataServices()) { return; }
|
||||||
const CVoiceCapabilities voiceCaps = sApp->getWebDataServices()->getVoiceCapabilityForCallsign(callsign);
|
const CVoiceCapabilities voiceCaps = sApp->getWebDataServices()->getVoiceCapabilityForCallsign(callsign);
|
||||||
CPropertyIndexVariantMap vm = CPropertyIndexVariantMap({ CClient::IndexUser, CUser::IndexRealName }, realname);
|
CPropertyIndexVariantMap vm = CPropertyIndexVariantMap({ CClient::IndexUser, CUser::IndexRealName }, realname);
|
||||||
vm.addValue({ CClient::IndexVoiceCapabilities }, voiceCaps);
|
vm.addValue({ CClient::IndexVoiceCapabilities }, voiceCaps);
|
||||||
@@ -483,6 +483,7 @@ namespace BlackCore
|
|||||||
void CAirspaceMonitor::onReceivedVatsimDataFile()
|
void CAirspaceMonitor::onReceivedVatsimDataFile()
|
||||||
{
|
{
|
||||||
Q_ASSERT(CThreadUtils::isCurrentThreadObjectThread(this));
|
Q_ASSERT(CThreadUtils::isCurrentThreadObjectThread(this));
|
||||||
|
if (!sApp || sApp->isShuttingDown() || !sApp->getWebDataServices()) { return; }
|
||||||
CClientList clients(this->getClients()); // copy
|
CClientList clients(this->getClients()); // copy
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
for (auto client = clients.begin(); client != clients.end(); ++client)
|
for (auto client = clients.begin(); client != clients.end(); ++client)
|
||||||
|
|||||||
Reference in New Issue
Block a user