Formatting

This commit is contained in:
Klaus Basan
2017-06-23 17:31:25 +02:00
parent 36037c4c04
commit 1956a27b19
8 changed files with 24 additions and 24 deletions

View File

@@ -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

View File

@@ -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<BlackMisc::Aviation::CCallsign, BlackMisc::CStatusMessageList> m_reverseLookupMessages;
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::CStatusMessageList> m_aircraftPartsHistory;
QMap<BlackMisc::Aviation::CCallsign, FsInnPacket> m_tempFsInnPackets;
@@ -247,11 +247,11 @@ namespace BlackCore
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::Aviation::CFlightPlan> 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

View File

@@ -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);
}

View File

@@ -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

View File

@@ -35,11 +35,11 @@ namespace BlackGui
explicit CModelMatcherLogComponent(QWidget *parent = nullptr);
//! Constructor
~CModelMatcherLogComponent();
virtual ~CModelMatcherLogComponent();
private:
QScopedPointer<Ui::CModelMatcherLogComponent> ui;
QTimer m_timer { this };
QTimer m_updateCompleterTimer { this };
QTextDocument m_text { this };
//! Init

View File

@@ -45,7 +45,7 @@ namespace BlackMisc
return s;
}
const QString CFlightPlan::flightruleToString(CFlightPlan::FlightRules rule)
const QString CFlightPlan::flightRuleToString(CFlightPlan::FlightRules rule)
{
switch (rule)
{

View File

@@ -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"

View File

@@ -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<ColumnIndex>();
const ColumnIndex i = index.frontCasted<ColumnIndex>();
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);