From 81ea636bc004f7b8cf9992b485bb1b1a200520d5 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 25 Jan 2018 04:46:24 +0100 Subject: [PATCH] Assert / formatting --- src/blackcore/context/contextnetworkimpl.cpp | 6 ++++-- src/blackcore/context/contextnetworkimpl.h | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/blackcore/context/contextnetworkimpl.cpp b/src/blackcore/context/contextnetworkimpl.cpp index f610e92fe..d4e7a043e 100644 --- a/src/blackcore/context/contextnetworkimpl.cpp +++ b/src/blackcore/context/contextnetworkimpl.cpp @@ -577,7 +577,7 @@ namespace BlackCore void CContextNetwork::requestDataUpdates() { - Q_ASSERT(m_network); + Q_ASSERT(m_airspace); if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; } if (!this->isConnected()) { return; } @@ -587,7 +587,7 @@ namespace BlackCore void CContextNetwork::requestAtisUpdates() { - Q_ASSERT(m_network); + Q_ASSERT(m_airspace); if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; } if (!this->isConnected()) { return; } @@ -596,6 +596,7 @@ namespace BlackCore bool CContextNetwork::updateAircraftEnabled(const CCallsign &callsign, bool enabledForRendering) { + Q_ASSERT(m_airspace); if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << callsign << enabledForRendering; } bool c = m_airspace->updateAircraftEnabled(callsign, enabledForRendering); if (c) @@ -609,6 +610,7 @@ namespace BlackCore bool CContextNetwork::updateAircraftModel(const CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator) { + Q_ASSERT(m_airspace); if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << callsign << model; } bool c = m_airspace->updateAircraftModel(callsign, model, originator); if (c) diff --git a/src/blackcore/context/contextnetworkimpl.h b/src/blackcore/context/contextnetworkimpl.h index 08c03e99c..0b3e3d918 100644 --- a/src/blackcore/context/contextnetworkimpl.h +++ b/src/blackcore/context/contextnetworkimpl.h @@ -67,6 +67,7 @@ namespace BlackCore { class CAirspaceMonitor; class CCoreFacade; + namespace Context { //! Network context implementation @@ -94,9 +95,9 @@ namespace BlackCore virtual BlackMisc::Aviation::CCallsignSet remoteAircraftSupportingParts() const override; virtual QList connectRemoteAircraftProviderSignals( QObject *receiver, - std::function addedSituationSlot, - std::function addedPartsSlot, - std::function removedAircraftSlot, + std::function addedSituationSlot, + std::function addedPartsSlot, + std::function removedAircraftSlot, std::function aircraftSnapshotSlot ) override; virtual bool updateAircraftRendered(const BlackMisc::Aviation::CCallsign &callsign, bool rendered) override;