mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Ref T129, formatting, removed namespace from signatures when "using namespace"
This commit is contained in:
committed by
Mathew Sutcliffe
parent
1daa640972
commit
b1795c77d8
@@ -138,7 +138,7 @@ namespace BlackCore
|
|||||||
QList<QMetaObject::Connection> CContextNetwork::connectRemoteAircraftProviderSignals(
|
QList<QMetaObject::Connection> CContextNetwork::connectRemoteAircraftProviderSignals(
|
||||||
QObject *receiver,
|
QObject *receiver,
|
||||||
std::function<void (const CAircraftSituation &)> situationSlot,
|
std::function<void (const CAircraftSituation &)> situationSlot,
|
||||||
std::function<void (const BlackMisc::Aviation::CCallsign &, const CAircraftParts &)> partsSlot,
|
std::function<void (const CCallsign &, const CAircraftParts &)> partsSlot,
|
||||||
std::function<void (const CCallsign &)> removedAircraftSlot,
|
std::function<void (const CCallsign &)> removedAircraftSlot,
|
||||||
std::function<void (const BlackMisc::Simulation::CAirspaceAircraftSnapshot &)> aircraftSnapshotSlot)
|
std::function<void (const BlackMisc::Simulation::CAirspaceAircraftSnapshot &)> aircraftSnapshotSlot)
|
||||||
{
|
{
|
||||||
@@ -344,7 +344,7 @@ namespace BlackCore
|
|||||||
m_network->sendFlightPlanQuery(this->ownAircraft().getCallsign());
|
m_network->sendFlightPlanQuery(this->ownAircraft().getCallsign());
|
||||||
}
|
}
|
||||||
|
|
||||||
CFlightPlan CContextNetwork::loadFlightPlanFromNetwork(const BlackMisc::Aviation::CCallsign &callsign) const
|
CFlightPlan CContextNetwork::loadFlightPlanFromNetwork(const CCallsign &callsign) const
|
||||||
{
|
{
|
||||||
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||||
return m_airspace->loadFlightPlanFromNetwork(callsign);
|
return m_airspace->loadFlightPlanFromNetwork(callsign);
|
||||||
@@ -515,7 +515,7 @@ namespace BlackCore
|
|||||||
return m_airspace->getAircraftInRangeForCallsign(callsign);
|
return m_airspace->getAircraftInRangeForCallsign(callsign);
|
||||||
}
|
}
|
||||||
|
|
||||||
CAircraftModel CContextNetwork::getAircraftInRangeModelForCallsign(const BlackMisc::Aviation::CCallsign &callsign) const
|
CAircraftModel CContextNetwork::getAircraftInRangeModelForCallsign(const CCallsign &callsign) const
|
||||||
{
|
{
|
||||||
if (this->isDebugEnabled()) { CLogMessage(this, BlackMisc::CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << callsign; }
|
if (this->isDebugEnabled()) { CLogMessage(this, BlackMisc::CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << callsign; }
|
||||||
return m_airspace->getAircraftInRangeModelForCallsign(callsign);
|
return m_airspace->getAircraftInRangeModelForCallsign(callsign);
|
||||||
@@ -696,7 +696,7 @@ namespace BlackCore
|
|||||||
m_airspace->testCreateDummyOnlineAtcStations(number);
|
m_airspace->testCreateDummyOnlineAtcStations(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CContextNetwork::testAddAircraftParts(const BlackMisc::Aviation::CCallsign &callsign, const CAircraftParts &parts, bool incremental)
|
void CContextNetwork::testAddAircraftParts(const CCallsign &callsign, const CAircraftParts &parts, bool incremental)
|
||||||
{
|
{
|
||||||
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << parts << incremental; }
|
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << parts << incremental; }
|
||||||
m_airspace->testAddAircraftParts(callsign, parts, incremental);
|
m_airspace->testAddAircraftParts(callsign, parts, incremental);
|
||||||
@@ -711,7 +711,7 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CMetar CContextNetwork::getMetarForAirport(const BlackMisc::Aviation::CAirportIcaoCode &airportIcaoCode) const
|
CMetar CContextNetwork::getMetarForAirport(const CAirportIcaoCode &airportIcaoCode) const
|
||||||
{
|
{
|
||||||
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << airportIcaoCode; }
|
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << airportIcaoCode; }
|
||||||
return sApp->getWebDataServices()->getMetarForAirport(airportIcaoCode);
|
return sApp->getWebDataServices()->getMetarForAirport(airportIcaoCode);
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ namespace BlackCore
|
|||||||
return m_fsdTextCodec->fromUnicode(qstr);
|
return m_fsdTextCodec->fromUnicode(qstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray CNetworkVatlib::toFSD(const BlackMisc::Aviation::CCallsign &callsign) const
|
QByteArray CNetworkVatlib::toFSD(const CCallsign &callsign) const
|
||||||
{
|
{
|
||||||
return toFSD(callsign.getStringAsSet());
|
return toFSD(callsign.getStringAsSet());
|
||||||
}
|
}
|
||||||
@@ -408,7 +408,7 @@ namespace BlackCore
|
|||||||
m_simulatorInfo = simInfo;
|
m_simulatorInfo = simInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::presetCallsign(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::presetCallsign(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isDisconnected(), Q_FUNC_INFO, "Can't change callsign while still connected");
|
Q_ASSERT_X(isDisconnected(), Q_FUNC_INFO, "Can't change callsign while still connected");
|
||||||
m_ownCallsign = callsign;
|
m_ownCallsign = callsign;
|
||||||
@@ -511,7 +511,7 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendCustomPacket(const BlackMisc::Aviation::CCallsign &callsign, const QString &packetId, const QStringList &data)
|
void CNetworkVatlib::sendCustomPacket(const CCallsign &callsign, const QString &packetId, const QStringList &data)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_SendCustomPilotPacket(m_net.data(), toFSD(callsign), toFSD(packetId), toFSD(data)(), data.size());
|
Vat_SendCustomPilotPacket(m_net.data(), toFSD(callsign), toFSD(packetId), toFSD(data)(), data.size());
|
||||||
@@ -523,13 +523,13 @@ namespace BlackCore
|
|||||||
Vat_SendClientQuery(m_net.data(), vatClientQueryIP, nullptr);
|
Vat_SendClientQuery(m_net.data(), vatClientQueryIP, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendFrequencyQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendFrequencyQuery(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_SendClientQuery(m_net.data(), vatClientQueryFreq, toFSD(callsign));
|
Vat_SendClientQuery(m_net.data(), vatClientQueryFreq, toFSD(callsign));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendUserInfoQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendUserInfoQuery(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_SendClientQuery(m_net.data(), vatClientQueryInfo, toFSD(callsign));
|
Vat_SendClientQuery(m_net.data(), vatClientQueryInfo, toFSD(callsign));
|
||||||
@@ -556,19 +556,19 @@ namespace BlackCore
|
|||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendServerQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendServerQuery(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_SendClientQuery(m_net.data(), vatClientQueryServer, toFSD(callsign));
|
Vat_SendClientQuery(m_net.data(), vatClientQueryServer, toFSD(callsign));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendAtcQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendAtcQuery(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_SendClientQuery(m_net.data(), vatClientQueryAtc, toFSD(callsign));
|
Vat_SendClientQuery(m_net.data(), vatClientQueryAtc, toFSD(callsign));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendAtisQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendAtisQuery(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_SendClientQuery(m_net.data(), vatClientQueryAtis, toFSD(callsign));
|
Vat_SendClientQuery(m_net.data(), vatClientQueryAtis, toFSD(callsign));
|
||||||
@@ -616,31 +616,31 @@ namespace BlackCore
|
|||||||
Vat_SendFlightPlan(m_net.data(), &vatlibFP);
|
Vat_SendFlightPlan(m_net.data(), &vatlibFP);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendFlightPlanQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendFlightPlanQuery(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_SendClientQuery(m_net.data(), vatClientQueryFP, toFSD(callsign));
|
Vat_SendClientQuery(m_net.data(), vatClientQueryFP, toFSD(callsign));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendRealNameQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendRealNameQuery(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_SendClientQuery(m_net.data(), vatClientQueryName, toFSD(callsign));
|
Vat_SendClientQuery(m_net.data(), vatClientQueryName, toFSD(callsign));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendCapabilitiesQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendCapabilitiesQuery(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_SendClientQuery(m_net.data(), vatClientQueryCaps, toFSD(callsign));
|
Vat_SendClientQuery(m_net.data(), vatClientQueryCaps, toFSD(callsign));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::replyToFrequencyQuery(const BlackMisc::Aviation::CCallsign &callsign) // private
|
void CNetworkVatlib::replyToFrequencyQuery(const CCallsign &callsign) // private
|
||||||
{
|
{
|
||||||
QStringList response { QString::number(getOwnAircraft().getCom1System().getFrequencyActive().value(CFrequencyUnit::MHz()), 'f', 3)};
|
QStringList response { QString::number(getOwnAircraft().getCom1System().getFrequencyActive().value(CFrequencyUnit::MHz()), 'f', 3)};
|
||||||
Vat_SendClientQueryResponse(m_net.data(), vatClientQueryFreq, toFSD(callsign), toFSD(response)(), response.size());
|
Vat_SendClientQueryResponse(m_net.data(), vatClientQueryFreq, toFSD(callsign), toFSD(response)(), response.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::replyToNameQuery(const BlackMisc::Aviation::CCallsign &callsign) // private
|
void CNetworkVatlib::replyToNameQuery(const CCallsign &callsign) // private
|
||||||
{
|
{
|
||||||
QStringList response { m_server.getUser().getRealName(), "" };
|
QStringList response { m_server.getUser().getRealName(), "" };
|
||||||
Vat_SendClientQueryResponse(m_net.data(), vatClientQueryName, toFSD(callsign), toFSD(response)(), response.size());
|
Vat_SendClientQueryResponse(m_net.data(), vatClientQueryName, toFSD(callsign), toFSD(response)(), response.size());
|
||||||
@@ -655,13 +655,13 @@ namespace BlackCore
|
|||||||
Vat_SendAircraftConfig(m_net.data(), toFSD(callsign), toFSD(data));
|
Vat_SendAircraftConfig(m_net.data(), toFSD(callsign), toFSD(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendIcaoCodesQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendIcaoCodesQuery(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_RequestAircraftInfo(m_net.data(), toFSD(callsign));
|
Vat_RequestAircraftInfo(m_net.data(), toFSD(callsign));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendAircraftInfo(const BlackMisc::Aviation::CCallsign &callsign) // private
|
void CNetworkVatlib::sendAircraftInfo(const CCallsign &callsign) // private
|
||||||
{
|
{
|
||||||
const QByteArray acTypeICAObytes = toFSD(m_ownAircraftIcaoCode.getDesignator());
|
const QByteArray acTypeICAObytes = toFSD(m_ownAircraftIcaoCode.getDesignator());
|
||||||
const QByteArray airlineICAObytes = toFSD(m_ownAirlineIcaoCode.getDesignator());
|
const QByteArray airlineICAObytes = toFSD(m_ownAirlineIcaoCode.getDesignator());
|
||||||
@@ -696,13 +696,13 @@ namespace BlackCore
|
|||||||
m_sentAircraftConfig = currentParts;
|
m_sentAircraftConfig = currentParts;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendPing(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendPing(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_SendPing(m_net.data(), toFSD(callsign));
|
Vat_SendPing(m_net.data(), toFSD(callsign));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendMetarQuery(const BlackMisc::Aviation::CAirportIcaoCode &airportIcao)
|
void CNetworkVatlib::sendMetarQuery(const CAirportIcaoCode &airportIcao)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
Vat_RequestMetar(m_net.data(), toFSD(airportIcao.asString()));
|
Vat_RequestMetar(m_net.data(), toFSD(airportIcao.asString()));
|
||||||
@@ -734,7 +734,7 @@ namespace BlackCore
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendCustomFsinnQuery(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendCustomFsinnQuery(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
const CSimulatedAircraft myAircraft(getOwnAircraft());
|
const CSimulatedAircraft myAircraft(getOwnAircraft());
|
||||||
@@ -751,7 +751,7 @@ namespace BlackCore
|
|||||||
sendCustomPacket(callsign, "FSIPIR", data);
|
sendCustomPacket(callsign, "FSIPIR", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::sendCustomFsinnReponse(const BlackMisc::Aviation::CCallsign &callsign)
|
void CNetworkVatlib::sendCustomFsinnReponse(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
Q_ASSERT_X(isConnected(), Q_FUNC_INFO, "Can't send to server when disconnected");
|
||||||
const CSimulatedAircraft myAircraft(getOwnAircraft());
|
const CSimulatedAircraft myAircraft(getOwnAircraft());
|
||||||
@@ -949,7 +949,7 @@ namespace BlackCore
|
|||||||
cbvar_cast(cbvar)->customPacketDispatcher(cbvar_cast(cbvar)->fromFSD(callsign), cbvar_cast(cbvar)->fromFSD(packetId), cbvar_cast(cbvar)->fromFSD(data, dataSize));
|
cbvar_cast(cbvar)->customPacketDispatcher(cbvar_cast(cbvar)->fromFSD(callsign), cbvar_cast(cbvar)->fromFSD(packetId), cbvar_cast(cbvar)->fromFSD(data, dataSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetworkVatlib::customPacketDispatcher(const BlackMisc::Aviation::CCallsign &callsign, const QString &packetId, const QStringList &data)
|
void CNetworkVatlib::customPacketDispatcher(const CCallsign &callsign, const QString &packetId, const QStringList &data)
|
||||||
{
|
{
|
||||||
if (packetId.compare("FSIPI", Qt::CaseInsensitive) == 0)
|
if (packetId.compare("FSIPI", Qt::CaseInsensitive) == 0)
|
||||||
{
|
{
|
||||||
@@ -1073,7 +1073,7 @@ namespace BlackCore
|
|||||||
default:
|
default:
|
||||||
case vatFlightTypeVFR: rules = CFlightPlan::VFR; break;
|
case vatFlightTypeVFR: rules = CFlightPlan::VFR; break;
|
||||||
case vatFlightTypeIFR: rules = CFlightPlan::IFR; break;
|
case vatFlightTypeIFR: rules = CFlightPlan::IFR; break;
|
||||||
// case Cvatlib_Network::fpRuleType_SVFR: rules = BlackMisc::Aviation::CFlightPlan::SVFR; break;
|
// case Cvatlib_Network::fpRuleType_SVFR: rules = CFlightPlan::SVFR; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto *self = cbvar_cast(cbvar);
|
auto *self = cbvar_cast(cbvar);
|
||||||
|
|||||||
Reference in New Issue
Block a user