diff --git a/src/blackcore/airspacemonitor.cpp b/src/blackcore/airspacemonitor.cpp index 22ce98746..aa0429f23 100644 --- a/src/blackcore/airspacemonitor.cpp +++ b/src/blackcore/airspacemonitor.cpp @@ -241,8 +241,8 @@ namespace BlackCore const int c = this->updateAircraftInRange(callsign, vm); { QReadLocker l(&m_lockAircraft); - CSimulatedAircraftList enabledAircrafts = m_aircraftInRange.findBy(&CSimulatedAircraft::fastPositionUpdates, true); - m_network->setInterimPositionReceivers(enabledAircrafts.getCallsigns()); + const CSimulatedAircraftList enabledAircraft = m_aircraftInRange.findBy(&CSimulatedAircraft::fastPositionUpdates, true); + m_network->setInterimPositionReceivers(enabledAircraft.getCallsigns()); } return c > 0; } @@ -771,7 +771,7 @@ namespace BlackCore if (changedOnline < 1) { return; } Q_ASSERT(changedOnline == 1); - CAtcStation station = this->m_atcStationsOnline.findFirstByCallsign(callsign); + const CAtcStation station = this->m_atcStationsOnline.findFirstByCallsign(callsign); emit this->changedAtcStationOnlineConnectionStatus(station, true); // send when voice room url is available vm.addValue(CAtcStation::IndexIsOnline, true); // with voice room ATC is online diff --git a/src/blackcore/airspacemonitor.h b/src/blackcore/airspacemonitor.h index 784a7c77e..662b74fca 100644 --- a/src/blackcore/airspacemonitor.h +++ b/src/blackcore/airspacemonitor.h @@ -232,10 +232,10 @@ namespace BlackCore QString modelString; }; - BlackMisc::Aviation::CAtcStationList m_atcStationsOnline; //!< online ATC stations - BlackMisc::Aviation::CAtcStationList m_atcStationsBooked; //!< booked ATC stations - BlackMisc::Network::CClientList m_otherClients; //!< client informatiom, thread safe access required - BlackMisc::Simulation::CSimulatedAircraftList m_aircraftInRange; //!< aircraft, thread safe access required + BlackMisc::Aviation::CAtcStationList m_atcStationsOnline; //!< online ATC stations + BlackMisc::Aviation::CAtcStationList m_atcStationsBooked; //!< booked ATC stations + BlackMisc::Network::CClientList m_otherClients; //!< client informatiom, thread safe access required + BlackMisc::Simulation::CSimulatedAircraftList m_aircraftInRange; //!< aircraft, thread safe access required QMap m_reverseLookupMessages; QMap m_aircraftPartsHistory; QMap m_tempFsInnPackets; @@ -247,11 +247,11 @@ namespace BlackCore QMap m_flightPlanCache; //!< flight plan information retrieved any cached - INetwork *m_network = nullptr; //!< corresponding network interface - CAirspaceAnalyzer *m_analyzer = nullptr; //!< owned analyzer - bool m_enableReverseLookupMsgs = false; //!< shall we log. information about the matching process - bool m_enableAircraftPartsHistory = true; //!< shall we keep a history of aircraft parts - bool m_bookingsRequested = false; //!< bookings have been requested, it can happen we receive an BlackCore::Vatsim::CVatsimBookingReader::atcBookingsReadUnchanged signal + INetwork *m_network = nullptr; //!< corresponding network interface + CAirspaceAnalyzer *m_analyzer = nullptr; //!< owned analyzer + bool m_enableReverseLookupMsgs = false; //!< shall we log. information about the matching process + bool m_enableAircraftPartsHistory = true; //!< shall we keep a history of aircraft parts + bool m_bookingsRequested = false; //!< bookings have been requested, it can happen we receive an BlackCore::Vatsim::CVatsimBookingReader::atcBookingsReadUnchanged signal // locks mutable QReadWriteLock m_lockSituations; //!< lock for situations: m_situationsByCallsign diff --git a/src/blackgui/components/modelmatchercomponent.cpp b/src/blackgui/components/modelmatchercomponent.cpp index 2a4fbfad4..5b3bba77d 100644 --- a/src/blackgui/components/modelmatchercomponent.cpp +++ b/src/blackgui/components/modelmatchercomponent.cpp @@ -119,7 +119,7 @@ namespace BlackGui } this->m_matcher.setDefaultModel(CModelMatcherComponent::defaultModel()); - const CAircraftModel matched = this->m_matcher.getClosestMatch(remoteAircraft, &msgs); + const CAircraftModel matched = this->m_matcher.getClosestMatch(remoteAircraft, &msgs); // test model matching ui->te_Results->setText(matched.toQString(true)); ui->tvp_ResultMessages->updateContainer(msgs); } diff --git a/src/blackgui/components/modelmatcherlogcomponent.cpp b/src/blackgui/components/modelmatcherlogcomponent.cpp index 02b1ed6f9..e588c34bf 100644 --- a/src/blackgui/components/modelmatcherlogcomponent.cpp +++ b/src/blackgui/components/modelmatcherlogcomponent.cpp @@ -35,7 +35,7 @@ namespace BlackGui ui->setupUi(this); ui->le_Callsign->setValidator(new CUpperCaseValidator(this)); ui->le_Callsign->setCompleter(new QCompleter(ui->le_Callsign)); - this->m_timer.setInterval(20 * 1000); + this->m_updateCompleterTimer.setInterval(20 * 1000); this->initGui(); this->m_text.setDefaultStyleSheet(CStatusMessageList::htmlStyleSheet()); connect(ui->le_Callsign, &QLineEdit::returnPressed, this, &CModelMatcherLogComponent::ps_callsignEntered); @@ -48,7 +48,7 @@ namespace BlackGui connect(sGui->getIContextNetwork(), &IContextNetwork::changedLogOrDebugSettings, this, &CModelMatcherLogComponent::ps_valuesChanged); connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CModelMatcherLogComponent::ps_connectionStatusChanged); } - connect(&this->m_timer, &QTimer::timeout, this, &CModelMatcherLogComponent::ps_updateCallsignCompleter); + connect(&this->m_updateCompleterTimer, &QTimer::timeout, this, &CModelMatcherLogComponent::ps_updateCallsignCompleter); } CModelMatcherLogComponent::~CModelMatcherLogComponent() @@ -57,14 +57,14 @@ namespace BlackGui void CModelMatcherLogComponent::initGui() { const bool needCallsigns = this->enabledMessages(); - if (needCallsigns && !this->m_timer.isActive()) + if (needCallsigns && !this->m_updateCompleterTimer.isActive()) { - this->m_timer.start(); + this->m_updateCompleterTimer.start(); this->ps_updateCallsignCompleter(); } else if (!needCallsigns) { - this->m_timer.stop(); + this->m_updateCompleterTimer.stop(); } // avoid signal roundtrip diff --git a/src/blackgui/components/modelmatcherlogcomponent.h b/src/blackgui/components/modelmatcherlogcomponent.h index e4b4beb1e..57f372f7b 100644 --- a/src/blackgui/components/modelmatcherlogcomponent.h +++ b/src/blackgui/components/modelmatcherlogcomponent.h @@ -35,11 +35,11 @@ namespace BlackGui explicit CModelMatcherLogComponent(QWidget *parent = nullptr); //! Constructor - ~CModelMatcherLogComponent(); + virtual ~CModelMatcherLogComponent(); private: QScopedPointer ui; - QTimer m_timer { this }; + QTimer m_updateCompleterTimer { this }; QTextDocument m_text { this }; //! Init diff --git a/src/blackmisc/aviation/flightplan.cpp b/src/blackmisc/aviation/flightplan.cpp index 803b4b8d3..9ab5739e4 100644 --- a/src/blackmisc/aviation/flightplan.cpp +++ b/src/blackmisc/aviation/flightplan.cpp @@ -45,7 +45,7 @@ namespace BlackMisc return s; } - const QString CFlightPlan::flightruleToString(CFlightPlan::FlightRules rule) + const QString CFlightPlan::flightRuleToString(CFlightPlan::FlightRules rule) { switch (rule) { diff --git a/src/blackmisc/aviation/flightplan.h b/src/blackmisc/aviation/flightplan.h index 94025d0c9..25b64bbad 100644 --- a/src/blackmisc/aviation/flightplan.h +++ b/src/blackmisc/aviation/flightplan.h @@ -186,7 +186,7 @@ namespace BlackMisc QString convertToQString(bool i18n = false) const; //! Rules to string - static const QString flightruleToString(FlightRules rule); + static const QString flightRuleToString(FlightRules rule); private: QString m_equipmentIcao; //!< e.g. "T/A320/F" diff --git a/src/blackmisc/simulation/simulatedaircraft.cpp b/src/blackmisc/simulation/simulatedaircraft.cpp index f80e6ca2c..1cdde71f8 100644 --- a/src/blackmisc/simulation/simulatedaircraft.cpp +++ b/src/blackmisc/simulation/simulatedaircraft.cpp @@ -286,7 +286,7 @@ namespace BlackMisc CVariant CSimulatedAircraft::propertyByIndex(const BlackMisc::CPropertyIndex &index) const { if (index.isMyself()) { return CVariant::from(*this); } - ColumnIndex i = index.frontCasted(); + const ColumnIndex i = index.frontCasted(); switch (i) { case IndexModel: @@ -372,7 +372,7 @@ namespace BlackMisc break; case IndexModel: this->m_models[CurrentModel].setPropertyByIndex(index.copyFrontRemoved(), variant); - this->setModel(this->m_models[CurrentModel]); // sync some values + this->setModel(this->m_models[CurrentModel]); // sync some values such as callsign break; case IndexNetworkModel: this->m_models[NetworkModel].setPropertyByIndex(index.copyFrontRemoved(), variant);