Remove unused code from the Release 2 scope modules

Trim mostly-deletion changes (~700 lines) across the modules the Release
2 build compiles: unused telegrams and receiver/handler code in
TrainingAreaBase (telegrams, recv_from_dds_aes/fts, ism/main/pdm/position
handlers), dead members in SqlBrowser and ProjectDataManagement,
unused LtsPluginManager loader paths, LtsSession unit-test, WlsTetra and
DdsView cleanups, plus the stale include_directories removal in
Lts/CMakeLists.txt. Continues the Release 2 source prune (keep only what
the build compiles).

Excluded from this commit by design: the machine-specific .envrc
(MIGRATE_PIPELINE_ROOT path fix stays uncommitted) and the untracked
qt5-before/ reference tree.
This commit is contained in:
berrux-dev committed 2026-11-17 17:28:48 +01:00
1 parent e60a860283
commit 84f8cfb41f
45 files changed
+30 -724

No files matched your search

@@ -1,6 +1,4 @@
#include "recv_from_dds_aes.h"
#include <utility>
#include "main_handler.h"
@@ -15,15 +13,11 @@
namespace TrainingAreaBase
{
AesStateHandler::AesStateHandler(MainHandler *mainHandler)
: m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
, m_dbInterface(mainHandler->dbHandler()->db())
, m_exerciseId(mainHandler->exerciseId()) {}
template<>
void RecvFromDdsAes::txData(const TrainingAreaBase::TetraIcd::DusMineReactivation &tele)
{
@@ -38,8 +32,6 @@ bool AesStateHandler::init()
{
const auto cb = [this](const Database::AesId2TaId & item)
{
m_tetraId2ddsId[item.aesTetraId] = item.aesDdsId;
m_ddsId2TetraId[item.aesDdsId] = item.aesTetraId;
DEBUG_LOG(m_logger) << "AES internal DDS id: " << item.aesDdsId << " - tetra id: " << item.aesTetraId;
@@ -59,7 +51,6 @@ bool AesStateHandler::init()
int AesStateHandler::createAesTetraId(int aesDdsId, bool &alreadyExists)
{
alreadyExists = false;
Database::AesId2TaId aes2Ta;
aes2Ta.aesTetraId = getAesTetraId(aesDdsId);
if (aes2Ta.aesTetraId != 0)
@@ -107,9 +98,6 @@ bool AesStateHandler::update(int aesDdsId, int aesTetraId, bool bSentToTetra)
return true;
}
RecvFromDdsAes::RecvFromDdsAes(MainHandler *mainHandler,
const std::shared_ptr<SendToTab> &txCallback,
QObject *parent)
@@ -128,7 +116,6 @@ RecvFromDdsAes::RecvFromDdsAes(MainHandler *mainHandler,
connect(m_checkOutdatedTelegramsTimer, &QTimer::timeout,
this, &RecvFromDdsAes::onCheckOutdatedTelegrams);
m_sendDusMineReactivtionTimer->setSingleShot(true);
m_sendDusMineReactivtionTimer->setInterval(200);
connect(m_sendDusMineReactivtionTimer, &QTimer::timeout,
@@ -372,9 +359,6 @@ bool RecvFromDdsAes::sendSingleFireSMArt(const SendCesHitRequest &request)
return true;
}
template <typename T>
void RecvFromDdsAes::handleEffectSimulation(const T &data, DataModification modType, TetraIcd::AreaEffectSimulationType aesType)
{
@@ -442,8 +426,6 @@ void RecvFromDdsAes::handleEffectSimulation(const T &data, DataModification modT
}
else
{
if (!(std::is_same<T, AreaEffectSimulation::FunctionalArea>::value) ||
(data.effectStateId == AreaEffectSimulation::AesEffectState::EsActivated))
handleSendToTetra(data, aesType);
@@ -545,12 +527,9 @@ void RecvFromDdsAes::onTriggeredImpactsChanged(const AreaEffectSimulation::Trigg
return;
if (data.aesTypeId != AreaEffectSimulation::AesType::AtMineAreaSingleMines)
return;
if (data.aesItemId == 0)
return;
bool completeUntriggered = true;
for (size_t i = 0; i < data.bitfield.size() && completeUntriggered; ++i)
{
@@ -572,7 +551,6 @@ void RecvFromDdsAes::onTriggeredImpactsChanged(const AreaEffectSimulation::Trigg
if (completeUntriggered)
return;
auto it = m_currentMineArea.find(data.aesItemId);
if (it != m_currentMineArea.end())
{
@@ -605,9 +583,7 @@ void RecvFromDdsAes::onTriggeredImpactsChanged(const AreaEffectSimulation::Trigg
}
TetraIcd::MineAreaSingleMineState out;
out.aesDdsId = data.aesItemId;
out.mineCount = data.impactCount;
out.mineState.reserve(data.bitfield.size());
for (const auto &c : data.bitfield)
@@ -625,23 +601,16 @@ void RecvFromDdsAes::onDusMineStateChanged(const AreaEffectSimulation::DusMineSt
if (vec.size() == 0)
return;
for (const auto &mine : vec)
{
if (!m_mainHandler->pdmHandler()->isReactivatableChargeType({mine.chargeTypeId, 0,0}))
continue;
if (mine != m_allReactivatableDusMines.value(mine.eqId))
{
if (!mine.triggered &&
m_allReactivatableDusMines.contains(mine.eqId) && m_allReactivatableDusMines.value(mine.eqId).triggered
)
m_minesToSend << mine.eqId;
m_allReactivatableDusMines.insert(mine.eqId, mine);
}
}
@@ -711,16 +680,11 @@ void setCommonCombatParams(T &out, const S &in, const int aesTetraId)
out.effectDuration = in.effectDuration;
}
void RecvFromDdsAes::onEffectsChanged(const AreaEffectSimulation::Effects &data, DataModification modType)
{
if (modType == DataModification::eRemoved)
return;
if (data.aesTypeId != AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions)
return;
@@ -728,32 +692,23 @@ void RecvFromDdsAes::onEffectsChanged(const AreaEffectSimulation::Effects &data,
if (aesItemId <= 0)
return;
const AreaEffectSimulation::ExplosionCluster &aes = m_dtcAes->explosionCluster(aesItemId);
if (aes.id != aesItemId)
return;
const bool bIsLaserGuidable = m_mainHandler->pdmHandler()->isLaserGuidable(aes.chargeStruct);
if (!bIsLaserGuidable)
return;
const std::vector<AreaEffectSimulation::SingleEffect> &singleEffectsRef = data.singleEffects;
if (!singleEffectsRef.empty())
{
bool bAlreadyExists = false;
const int aesTetraId = m_aesStateHandler->createAesTetraId(aesItemId, bAlreadyExists);
DEBUG_LOG(m_logger) << "RecvFromDdsAes::onEffectsChanged(Effects, "
<< aesTetraId << ")";
TetraIcd::CreateAreaExplosion cAes;
setCommonCombatParams(cAes, aes, aesTetraId);
if(cAes.effectStart > 0)
{
@@ -763,11 +718,9 @@ void RecvFromDdsAes::onEffectsChanged(const AreaEffectSimulation::Effects &data,
cAes.effectStart += (delayMSec);
}
const AreaEffectSimulation::SingleEffect &firstSingleEffect = singleEffectsRef.front();
const Core::GeoPosition &fsePosition = firstSingleEffect.position;
cAes.relCorner = m_posHandler->geographicToRelative(fsePosition);
cAes.width = qRound(aes.area.width);
cAes.height = qRound(aes.area.height);
cAes.rotationAngle = aes.area.rotation;
@@ -784,14 +737,7 @@ void RecvFromDdsAes::onEffectsChanged(const AreaEffectSimulation::Effects &data,
for (const Core::GeoPosition2D &pos : std::as_const(aes.mhPoints))
mhPointsRef.emplace_back(m_posHandler->geographicToRelative(pos, 0));
cAes.chargeTypeId = 254;
cAes.chargeTypeId = 254;
txData(cAes);
}
}
@@ -810,9 +756,7 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::AirS
setCommonCombatParams(cAes, aes, aesTetraId);
cAes.header.equipmentNumber = 0;
cAes.relEffectPosition = m_posHandler->geographicToRelative(aes.impactPosition, 0);
cAes.relEffectPosition = m_posHandler->geographicToRelative(aes.impactPosition, 0);
const auto chargeType(pdm()->chargeTypeFromId(aes.chargeStruct.chargeTypeId));
cAes.chargeTypeId = chargeType.legacyId > 0 ? chargeType.legacyId : chargeType.id;
@@ -846,7 +790,6 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::BCCo
cAes.validityTimeWind = aes.weatherTimestamp;
cAes.relPositionValidityTimeWind = m_posHandler->geographicToRelative(aes.weatherPosition, 0);
const auto chargeType(pdm()->chargeTypeFromId(aes.chargeStruct.chargeTypeId));
cAes.chargeTypeId = chargeType.legacyId > 0 ? chargeType.legacyId : chargeType.id;
@@ -890,8 +833,6 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::Expl
cAes.impactCount = aes.cannonCount * aes.cannonRounds;
cAes.impactEdgeLength = qRound(pdm()->impactEdgeLength(aes.chargeStruct));
cAes.hazardDistance = m_mainHandler->pdmHandler()->hazardDistance(aes.chargeStruct);
const auto chargeType(pdm()->chargeTypeFromId(aes.chargeStruct.chargeTypeId));
cAes.chargeTypeId = chargeType.legacyId > 0 ? chargeType.legacyId : chargeType.id;
@@ -903,17 +844,13 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::Expl
void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::ExplosionCluster &aes, int aesTetraId)
{
const bool bIsLaserGuidable = m_mainHandler->pdmHandler()->isLaserGuidable(aes.chargeStruct);
DEBUG_LOG(m_logger) << "RecvFromDdsAes::sendCreateEffectSimulation "
<< ", aes " << aes
<< ", bIsLaserGuidable " << bIsLaserGuidable;
if (bIsLaserGuidable)
{
return;
}
@@ -925,10 +862,7 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::Expl
DEBUG_LOG(m_logger) << "RecvFromDdsAes::sendCreateEffectSimulation(ExplosionArea, "
<< aesTetraId << ")";
TetraIcd::CreateAreaExplosion cAes;
setCommonCombatParams(cAes, aes, aesTetraId);
cAes.relCorner = m_posHandler->geographicToRelative(aes.area.cornerBottomLeft, 0);
cAes.width = qRound(aes.area.width);
cAes.height = qRound(aes.area.height);
@@ -948,9 +882,6 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::Expl
int chargeTypeId = 0;
const auto chargeType(pdm()->chargeTypeFromId(aes.chargeStruct.chargeTypeId));
chargeTypeId = pdm()->legacyChargeTypeIgniterType(aes.chargeStruct.chargeTypeId, aes.chargeStruct.igniterTypeId, aes.chargeStruct.igniterFunctionId);
if (chargeTypeId > 0)
cAes.chargeTypeId = chargeTypeId;
else
@@ -960,7 +891,6 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::Expl
if (cAes.chargeTypeId <= 0)
return;
txData(cAes);
}
@@ -979,8 +909,6 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::Expl
cAes.header.equipmentNumber = equipmentNumber;
cAes.relEffectPosition = m_posHandler->geographicToRelative(aes.impactPosition, 0);
cAes.effectDiameter = qRound(2 * pdm()->impactRadius(aes.chargeStruct));
const auto chargeType(pdm()->chargeTypeFromId(aes.chargeStruct.chargeTypeId));
cAes.chargeTypeId = chargeType.legacyId > 0 ? chargeType.legacyId : chargeType.id;
@@ -1002,13 +930,8 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::Mine
TetraIcd::CreateMineArea cAes;
setCommonCombatParams(cAes, aes, aesTetraId);
cAes.layingDepth = aes.width;
cAes.layingDensity = aes.density;
const auto chargeType(pdm()->chargeTypeFromId(aes.chargeStruct.chargeTypeId));
cAes.chargeTypeId = chargeType.legacyId > 0 ? chargeType.legacyId : chargeType.id;
@@ -1069,9 +992,7 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::NCon
cAes.borderLengthOuter = qRound(aes.borderLengthOuter);
cAes.spanAngle = aes.spanAngle;
cAes.rotationAngle = aes.rotationAngle;
cAes.chargeTypeId = aes.chargeStruct.chargeTypeId;
txData(cAes);
}
@@ -1111,9 +1032,7 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::Tech
DEBUG_LOG(m_logger) << "RecvFromDdsAes::sendCreateEffectSimulation(TechnicalArea, "
<< aesTetraId << ")";
TetraIcd::TechnicalArea fAes;
fAes.aesDdsId = aes.id;
fAes.name = aes.name;
fAes.taType = static_cast<TetraIcd::TechnicalArea::Type>(aes.type);
fAes.relCorner = m_posHandler->geographicToRelative(aes.area.cornerBottomLeft, 0);
@@ -1148,15 +1067,12 @@ void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::DusS
void RecvFromDdsAes::sendCreateEffectSimulation(const AreaEffectSimulation::GasPipe &aes, int aesTetraId)
{
Q_UNUSED(aes);
Q_UNUSED(aesTetraId);
}
void RecvFromDdsAes::sendModifyEffectSimulationName(TetraIcd::AreaEffectSimulationType aesType, int aesTetraId, const std::string &name, int aesId)
{
if (aesTetraId == 0)
{
WARNING_LOG(m_logger) << "Trying to modify an effect simulation name but have no aes identification: " << name;
@@ -1167,10 +1083,8 @@ void RecvFromDdsAes::sendModifyEffectSimulationName(TetraIcd::AreaEffectSimulati
TetraIcd::ModifyAreaEffectSimulationName mAes;
mAes.aesType = aesType;
mAes.aesDdsId = aesId;
mAes.aesDdsId = aesId;
mAes.name = name;
txData(mAes);
}
@@ -1181,8 +1095,6 @@ void RecvFromDdsAes::sendRemoveEffectSimulation(TetraIcd::AreaEffectSimulationTy
if (aesType == TetraIcd::AreaEffectSimulationType::GasPipeDetonation)
return;
const int aesTetraId = m_aesStateHandler->getAesTetraId(aesDdsId);
if (aesTetraId == 0)
{
@@ -1237,8 +1149,6 @@ void RecvFromDdsAes::sendPauseEffectSimulation(int aesDdsId)
TetraIcd::PauseEffectSimulation dAes;
dAes.aesDdsId = aesDdsId;
txData(dAes);
}
@@ -1269,7 +1179,6 @@ void RecvFromDdsAes::sendResumeEffectSimulation(const AreaEffectSimulation::Expl
TetraIcd::ResumeEffectSimulation dAes;
dAes.aesDdsId = aes.id;
dAes.sequelNumber = AreaEffectSimulation::Polygons::getSequelNumber(aes.id,
aes.cannonCount * aes.cannonRounds,
aes.originalEffectDuration,
@@ -1281,7 +1190,6 @@ void RecvFromDdsAes::sendResumeEffectSimulation(const AreaEffectSimulation::Expl
txData(dAes);
}
template<>
void RecvFromDdsAes::sendResumeEffectSimulation(const AreaEffectSimulation::ExplosionCluster &aes)
{
@@ -1370,6 +1278,5 @@ void RecvFromDdsAes::fillCentralChangesTable(const T &data)
{
dataChanged(data);
}
}