diff --git a/src/blackconfig/buildconfig.h b/src/blackconfig/buildconfig.h index e8fe8eb86..af3dd2231 100644 --- a/src/blackconfig/buildconfig.h +++ b/src/blackconfig/buildconfig.h @@ -88,7 +88,6 @@ namespace BlackConfig static bool isRunningOnUnixPlatform(); //! Application directory where current application is located - //! \todo Move to to CApplication static const QString &getApplicationDir(); //! Where resource files (static DB files, ...) etc are located diff --git a/src/blackcore/application.h b/src/blackcore/application.h index 3f2d39712..69b2cd521 100644 --- a/src/blackcore/application.h +++ b/src/blackcore/application.h @@ -213,6 +213,7 @@ namespace BlackCore static void processEventsFor(int milliseconds); //! Clear the caches + //! \return all cache files static QStringList clearCaches(); // ----------------------- parsing ---------------------------------------- diff --git a/src/blackcore/context/contextnetworkimpl.h b/src/blackcore/context/contextnetworkimpl.h index 3d35284f6..1a6f8af2d 100644 --- a/src/blackcore/context/contextnetworkimpl.h +++ b/src/blackcore/context/contextnetworkimpl.h @@ -132,13 +132,13 @@ namespace BlackCore bool isPendingConnection() const; // --------------------- IContextNetwork implementations --------------------- + //! \copydoc IContextNetwork::parseCommandLine //! \ingroup commandline //! @{ //!
//! .m .msg message text
//!
//! @}
- //! \copydoc IContextNetwork::parseCommandLine
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) override;
//! \publicsection
diff --git a/src/blackcore/context/contextsimulatorimpl.h b/src/blackcore/context/contextsimulatorimpl.h
index 9594a9d9a..e762d64a0 100644
--- a/src/blackcore/context/contextsimulatorimpl.h
+++ b/src/blackcore/context/contextsimulatorimpl.h
@@ -104,14 +104,14 @@ namespace BlackCore
BlackMisc::Simulation::CMatchingStatistics getCurrentMatchingStatistics(bool missingOnly) const override;
//! @}
+ //! \copydoc IContextSimulator::parseCommandLine
//! \ingroup commandline
//! @{
//!
- //! .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)
//!
//! @}
- //! \copydoc IContextSimulator::parseCommandLine
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) override;
// ----------------------------- context interface -----------------------------
diff --git a/src/blackcore/network.h b/src/blackcore/network.h
index 3abcf6b9c..6e994d9e5 100644
--- a/src/blackcore/network.h
+++ b/src/blackcore/network.h
@@ -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);
//! @}
diff --git a/src/blackcore/vatsim/networkvatlib.cpp b/src/blackcore/vatsim/networkvatlib.cpp
index c0f383b4b..8a0f96b43 100644
--- a/src/blackcore/vatsim/networkvatlib.cpp
+++ b/src/blackcore/vatsim/networkvatlib.cpp
@@ -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));
}
diff --git a/src/blackgui/components/logincomponent.ui b/src/blackgui/components/logincomponent.ui
index a04165969..9ee2ee0b7 100644
--- a/src/blackgui/components/logincomponent.ui
+++ b/src/blackgui/components/logincomponent.ui
@@ -157,8 +157,11 @@
+ //! .plugin fsuipc on|off FSUIPC on/off + //!+ //! @} virtual bool parseDetails(const BlackMisc::CSimpleCommandParser &parser) override; QString m_simulatorName; //!< name of simulator diff --git a/src/plugins/simulator/fsx/simulatorfsx.cpp b/src/plugins/simulator/fsx/simulatorfsx.cpp index 3804b936d..2f8619c42 100644 --- a/src/plugins/simulator/fsx/simulatorfsx.cpp +++ b/src/plugins/simulator/fsx/simulatorfsx.cpp @@ -309,12 +309,12 @@ namespace BlackSimPlugin void CSimulatorFsx::setSimConnected() { m_simConnected = true; - this->initInternalsObject(); + this->initSimulatorInternals(); emitSimulatorCombinedStatus(); // Internals depends on sim data which take a while to be read // this is a trich and I re-init again after a while (which is not really expensive) - QTimer::singleShot(1000, this, [this] { this->initInternalsObject(); }); + QTimer::singleShot(1000, this, [this] { this->initSimulatorInternals(); }); } void CSimulatorFsx::onSimRunning() @@ -1081,9 +1081,9 @@ namespace BlackSimPlugin return false; } - void CSimulatorFsx::initInternalsObject() + void CSimulatorFsx::initSimulatorInternals() { - CSimulatorFsCommon::initInternalsObject(); + CSimulatorFsCommon::initSimulatorInternals(); CSimulatorInternals s = this->m_simulatorInternals; const QString fsxPath = CFsCommonUtil::fsxDirFromRegistry(); // can be empty for remote FSX if (!fsxPath.isEmpty()) { s.setSimulatorInstallationDirectory(fsxPath); } diff --git a/src/plugins/simulator/fsx/simulatorfsx.h b/src/plugins/simulator/fsx/simulatorfsx.h index f8329487c..9969e3ef9 100644 --- a/src/plugins/simulator/fsx/simulatorfsx.h +++ b/src/plugins/simulator/fsx/simulatorfsx.h @@ -113,7 +113,7 @@ namespace BlackSimPlugin //! @{ virtual void reset() override; virtual void clearAllAircraft() override; - virtual void initInternalsObject() override; + virtual void initSimulatorInternals() override; virtual void injectWeatherGrid(const BlackMisc::Weather::CWeatherGrid &weatherGrid) override; //! @} diff --git a/tests/blackmisc/testaviation.cpp b/tests/blackmisc/testaviation.cpp index c22318f9d..cd842a155 100644 --- a/tests/blackmisc/testaviation.cpp +++ b/tests/blackmisc/testaviation.cpp @@ -131,23 +131,23 @@ namespace BlackMiscTest QVERIFY2(cs1 == cs2, "Callsigns shall be equal"); QVERIFY2(cs1 != cs3, "Callsigns shall not be equal"); - CCallsignSet list; - list.push_back(cs1); - QVERIFY2(list.size() == 1, "List shall be 1"); - QVERIFY2(list.contains(cs1), "Callsign is in list"); - QVERIFY2(list.contains(cs2), "Callsign is in list"); - list.remove(cs1); + CCallsignSet set; + set.push_back(cs1); + QVERIFY2(set.size() == 1, "List shall be 1"); + QVERIFY2(set.contains(cs1), "Callsign is in list"); + QVERIFY2(set.contains(cs2), "Callsign is in list"); + set.remove(cs1); QVERIFY2(cs1 == cs1, "Callsign is the same, shall be equal"); - QVERIFY2(list.size() == 0, "List shall be 0 after removal"); - list.push_back(cs1); - if (!list.contains(cs2)) list.push_back(cs2); - QVERIFY2(list.size() == 1, "Duplicates shall not be added"); - list.push_back(cs3); - QVERIFY2(list.size() == 2, "2 different callsigns"); - list.remove(cs1); - QVERIFY2(list.size() == 1, "Only one should be left in list"); - list.removeIf(&CCallsign::getTelephonyDesignator, "München Radar"); - QVERIFY2(list.size() == 0, "Last should be gone"); + QVERIFY2(set.size() == 0, "List shall be 0 after removal"); + set.push_back(cs1); + if (!set.contains(cs2)) set.push_back(cs2); + QVERIFY2(set.size() == 1, "Duplicates shall not be added"); + set.push_back(cs3); + QVERIFY2(set.size() == 2, "2 different callsigns"); + set.remove(cs1); + QVERIFY2(set.size() == 1, "Only one should be left in list"); + set.removeIf(&CCallsign::getTelephonyDesignator, "München Radar"); + QVERIFY2(set.size() == 0, "Last should be gone"); } /*