Formatting, renaming, Doxygen, minor UI adjustments

This commit is contained in:
Klaus Basan
2017-01-24 20:28:57 +01:00
committed by Mathew Sutcliffe
parent 7ddb69825a
commit 68dccbefa6
16 changed files with 68 additions and 50 deletions

View File

@@ -213,6 +213,7 @@ namespace BlackCore
static void processEventsFor(int milliseconds);
//! Clear the caches
//! \return all cache files
static QStringList clearCaches();
// ----------------------- parsing ----------------------------------------

View File

@@ -132,13 +132,13 @@ namespace BlackCore
bool isPendingConnection() const;
// --------------------- IContextNetwork implementations ---------------------
//! \copydoc IContextNetwork::parseCommandLine
//! \ingroup commandline
//! @{
//! <pre>
//! .m .msg message text
//! </pre>
//! @}
//! \copydoc IContextNetwork::parseCommandLine
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) override;
//! \publicsection

View File

@@ -104,14 +104,14 @@ namespace BlackCore
BlackMisc::Simulation::CMatchingStatistics getCurrentMatchingStatistics(bool missingOnly) const override;
//! @}
//! \copydoc IContextSimulator::parseCommandLine
//! \ingroup commandline
//! @{
//! <pre>
//! .plugin forwared to plugin, see details there
//! .driver .drv forwared to plugin (same as above)
//! .plugin forwarded to plugin, see details there
//! .driver .drv forwarded to plugin (same as above)
//! </pre>
//! @}
//! \copydoc IContextSimulator::parseCommandLine
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) override;
// ----------------------------- context interface -----------------------------

View File

@@ -520,16 +520,19 @@ namespace BlackCore
/*!
* We received a custom packet.
* \deprecated As a short cut you can use this signal directly, but it is better to implement the decoding in INetwork and add a new signal.
* \sa CNetworkVatlib::customPacketDispatcher
*/
void customPacketReceived(const BlackMisc::Aviation::CCallsign &callsign, const QString &packetId, const QStringList &data);
/*!
* We received an FSInn custom packet.
* We received a FSInn custom packet.
*/
void customFSInnPacketReceived(const BlackMisc::Aviation::CCallsign &callsign, const QString &airlineDesignator,
const QString &aircraftDesignator, const QString &combinedType, const QString &modelString);
//! We received a aircraft config packet
/*!
* We received an aircraft config packet.
*/
void aircraftConfigPacketReceived(const BlackMisc::Aviation::CCallsign &callsign, const QJsonObject &incremental, bool isFull);
//! @}

View File

@@ -473,7 +473,7 @@ namespace BlackCore
if (messages.isEmpty()) { return; }
CTextMessageList privateMessages = messages.getPrivateMessages();
privateMessages.markAsSent();
for (const auto &message : privateMessages)
for (const auto &message : as_const(privateMessages))
{
if (message.getRecipientCallsign().isEmpty()) { continue; }
Vat_SendTextMessage(m_net.data(), toFSD(message.getRecipientCallsign()), toFSD(message.getMessage()));
@@ -646,7 +646,7 @@ namespace BlackCore
void CNetworkVatlib::sendIncrementalAircraftConfig()
{
if (!isConnected()) { return; }
CAircraftParts currentParts(getOwnAircraftParts());
const CAircraftParts currentParts(getOwnAircraftParts());
// If it hasn't changed, return
if (m_sentAircraftConfig == currentParts) { return; }
@@ -661,9 +661,9 @@ namespace BlackCore
// Method could have been triggered by another change in aircraft config
// so a previous update might still be scheduled. Stop it.
if (m_scheduledConfigUpdate.isActive()) m_scheduledConfigUpdate.stop();
QJsonObject previousConfig = m_sentAircraftConfig.toJson();
QJsonObject currentConfig = currentParts.toJson();
QJsonObject incrementalConfig = getIncrementalObject(previousConfig, currentConfig);
const QJsonObject previousConfig = m_sentAircraftConfig.toJson();
const QJsonObject currentConfig = currentParts.toJson();
const QJsonObject incrementalConfig = getIncrementalObject(previousConfig, currentConfig);
broadcastAircraftConfig(incrementalConfig);
m_sentAircraftConfig = currentParts;
}
@@ -734,7 +734,7 @@ namespace BlackCore
QString modelString = myAircraft.getModel().getModelString();
if (modelString.isEmpty()) { modelString = defaultModelString(); }
QStringList data { { "0" },
const QStringList data { { "0" },
myAircraft.getAirlineIcaoCodeDesignator(),
myAircraft.getAircraftIcaoCodeDesignator(),
{ "" }, { "" }, { "" }, { "" },
@@ -751,7 +751,7 @@ namespace BlackCore
QString modelString = myAircraft.getModel().getModelString();
if (modelString.isEmpty()) { modelString = defaultModelString(); }
QStringList data { { "0" },
const QStringList data { { "0" },
myAircraft.getAirlineIcaoCodeDesignator(),
myAircraft.getAircraftIcaoCodeDesignator(),
{ "" }, { "" }, { "" }, { "" },
@@ -770,8 +770,8 @@ namespace BlackCore
void CNetworkVatlib::sendAircraftConfigQuery(const CCallsign &callsign)
{
QJsonDocument doc(JsonPackets::aircraftConfigRequest());
QString data { doc.toJson(QJsonDocument::Compact) };
const QJsonDocument doc(JsonPackets::aircraftConfigRequest());
const QString data { doc.toJson(QJsonDocument::Compact) };
Vat_SendAircraftConfig(m_net.data(), toFSD(callsign), toFSD(data));
}