From 5485a90385a923137e9e50fa0a94f9777692cfb7 Mon Sep 17 00:00:00 2001 From: berrux_dev Date: Mon, 21 Sep 2026 06:43:28 +0000 Subject: [PATCH] Lts/Services: finalize Qt6/C++17 migration cleanup Remove deprecated Qt5 patterns remaining in Services: - Replace remaining SIGNAL/SLOT string syntax with function pointer syntax (NmeaManagement/socket_handler.cpp, AudioVideoManagement/ModuleTests/mvs_tests.cpp) - Remove Qt::UniqueConnection (deprecated in Qt6, default behavior) from 19 files across AES, CES plugins, and cross-services (47 occurrences) - Remove umbrella #include from fire_automaton.h and aes_test_fire_automaton.h (specific includes suffice) 25 files changed, 74 insertions(+), 81 deletions(-) --- .../effect_cluster_module_test.cpp | 9 +++--- .../explosion_cluster_module_test.cpp | 10 +++--- .../aes_others_module_test.cpp | 6 ++-- .../aes_test_fire_automaton.cpp | 32 +++++++++---------- .../aes_test_fire_automaton.h | 1 - .../Utils/fire_automaton.cpp | 2 +- .../Utils/fire_automaton.h | 1 - .../Utils/firing_timer.cpp | 4 +-- .../object_effect_cluster.cpp | 16 ++++------ .../object_explosion_cluster.cpp | 12 +++---- .../object_functional_area.cpp | 2 +- .../ModuleTests/mvs_tests.cpp | 10 +++--- .../Plugins/Buildings/handler_aes_data.cpp | 4 +-- .../Plugins/Explosions/handler_explosions.cpp | 2 +- .../MissionPlan/ces_mission_plan_handler.cpp | 2 +- .../Plugins/TargetAreas/targettimer.cpp | 3 +- .../EffectShowManagement/handler_aes_data.cpp | 4 +-- .../Evaluations/ModuleTests/evl_tests.cpp | 2 +- .../FileManagement/thp_script_httq.cpp | 4 +-- .../Services/GuezIedManagement/object_ied.cpp | 2 +- .../NmeaManagement/socket_handler.cpp | 11 +++---- .../websocket_interface_handler.cpp | 2 +- .../ServiceManagement/service_process.cpp | 4 +-- .../TargetManagement/shootback_controller.cpp | 8 ++--- .../WsBaseDataInterface/data_manager.cpp | 2 +- 25 files changed, 74 insertions(+), 81 deletions(-) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.cpp index 398f31f94..8c53cf4de 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.cpp @@ -869,15 +869,14 @@ void ModuleTestEffectCluster::initTestCase() // this, &ModuleTestEffectCluster::onParticipantChanged); connect(m_ppmDtc.get(), &ParticipantManagement::Interface::Dtc::partyChanged, this, &ModuleTestEffectCluster::onPartyChanged); - connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::aesItemViewChanged, this, &ModuleTestEffectCluster::onAesItemViewChanged, Qt::UniqueConnection); + connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::aesItemViewChanged, this, &ModuleTestEffectCluster::onAesItemViewChanged); connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::trajectoryTimeAwareChanged, this, - &ModuleTestEffectCluster::onTrajectoryTimeAwareChanged, - Qt::UniqueConnection); + &ModuleTestEffectCluster::onTrajectoryTimeAwareChanged); - connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::effectsChanged, this, &ModuleTestEffectCluster::onEffectsChanged, Qt::UniqueConnection); - connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::chargeEffectChanged, this, &ModuleTestEffectCluster::onChargeEffectChanged, Qt::UniqueConnection); + connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::effectsChanged, this, &ModuleTestEffectCluster::onEffectsChanged); + connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::chargeEffectChanged, this, &ModuleTestEffectCluster::onChargeEffectChanged); // spend some for the eventLoop to "consume" existing topics/samples: for (int i = 0; i < 10; ++i) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.cpp index 97fbc69d2..6e80781d2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.cpp @@ -1102,7 +1102,7 @@ void ModuleTestExplosionCluster::initTestCase() QVERIFY2(bRet, "ERROR, enableAll failed!!"); connect(m_bldDtc.get(), &Buildings::Interface::Dtc::buildingStateChanged, - this, &ModuleTestExplosionCluster::onBuildingStateChanged, Qt::UniqueConnection); + this, &ModuleTestExplosionCluster::onBuildingStateChanged); // // ISM @@ -1150,15 +1150,15 @@ void ModuleTestExplosionCluster::initTestCase() // connect at the end to skip unwanted connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::explosionClusterChanged, - this, &ModuleTestExplosionCluster::onExplosionClusterChanged, Qt::UniqueConnection); + this, &ModuleTestExplosionCluster::onExplosionClusterChanged); connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::aesItemViewChanged, - this, &ModuleTestExplosionCluster::onAesItemViewChanged, Qt::UniqueConnection); + this, &ModuleTestExplosionCluster::onAesItemViewChanged); connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::trajectoryTimeAwareChanged, - this, &ModuleTestExplosionCluster::onTrajectoryTimeAwareChanged, Qt::UniqueConnection); + this, &ModuleTestExplosionCluster::onTrajectoryTimeAwareChanged); connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::effectsChanged, - this, &ModuleTestExplosionCluster::onEffectsChanged, Qt::UniqueConnection); + this, &ModuleTestExplosionCluster::onEffectsChanged); // spend some for the eventLoop to "consume" existing topics/samples: for (int i = 0; i<10; ++i) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.cpp index d0f194a69..a549846da 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.cpp @@ -506,13 +506,13 @@ void ModuleTestAesOthers::initTestCase() // connect at the end to skip unwanted connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::boobyTrapChanged, - this, &ModuleTestAesOthers::boobyTrapChanged, Qt::UniqueConnection); + this, &ModuleTestAesOthers::boobyTrapChanged); connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::offRouteMineChanged, - this, &ModuleTestAesOthers::offRouteMineChanged, Qt::UniqueConnection); + this, &ModuleTestAesOthers::offRouteMineChanged); connect(m_aesDtc.get(), &AreaEffectSimulation::Interface::Dtc::aesItemViewChanged, - this, &ModuleTestAesOthers::onAesItemViewChanged, Qt::UniqueConnection); + this, &ModuleTestAesOthers::onAesItemViewChanged); // spend some for the eventLoop to "consume" existing topics/samples: for (int i = 0; i < 10; ++i) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.cpp index db5154567..ba3796230 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.cpp @@ -134,12 +134,12 @@ void TestFireAutomaton::testScheduling(int32_t time, FireAutomaton::TimeType typ FireAutomaton automaton; QVERIFY(automaton.init(time, type, numberOfRounds, effectorIds, pattern)); - QSignalSpy spyFire(&automaton, SIGNAL(fire(int32_t))); + QSignalSpy spyFire(&automaton, &FireAutomaton::fire); QVERIFY(spyFire.isValid()); - - QSignalSpy spyFinished(&automaton, SIGNAL(finished())); + + QSignalSpy spyFinished(&automaton, &FireAutomaton::finished); QVERIFY(spyFinished.isValid()); - + connect(&automaton, &FireAutomaton::fire, this, &TestFireAutomaton::fireReceived); qint64 startTimeMSecs = QDateTime::currentMSecsSinceEpoch(); @@ -207,9 +207,9 @@ void TestFireAutomaton::testStepping(int32_t numberOfRounds, const QVector -#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.cpp index 040ac2c28..f40d01dfb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.cpp @@ -29,7 +29,7 @@ FireAutomaton::FireAutomaton(QObject *parent) , m_logger(getLogger("Utils.FireAutomaton")) { m_timer.setSingleShot(true); - connect(&m_timer, &QTimer::timeout, this, &FireAutomaton::nextTick, Qt::UniqueConnection); + connect(&m_timer, &QTimer::timeout, this, &FireAutomaton::nextTick); } /** diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.h index 93432c596..8a68e04b8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.h @@ -5,7 +5,6 @@ * $Author$ */ -#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.cpp index 0d8a71700..398039eb6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.cpp @@ -177,7 +177,7 @@ bool FiringTimer::init(long effectDurationMsec, int ammoCount, long ammoFlightDu d->m_firingTimer->setSingleShot(false); d->m_firingTimer->setInterval(d->m_intervallMsec); connect(d->m_firingTimer, &QTimer::timeout, - this, &FiringTimer::onFiringTimout, Qt::UniqueConnection); + this, &FiringTimer::onFiringTimout); TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END"; return true; @@ -460,7 +460,7 @@ void FiringTimer::onFiringTimout() // : maybe use disconnect via QMetaObject connect(d->m_firingTimer, &QTimer::timeout, - this, &FiringTimer::onFiringTimoutExpiredPlus, Qt::UniqueConnection); + this, &FiringTimer::onFiringTimoutExpiredPlus); d->m_firingTimer->setSingleShot(true); d->m_firingTimer->start(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effect_cluster.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effect_cluster.cpp index 1477fe688..4ffde8e5b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effect_cluster.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effect_cluster.cpp @@ -3282,8 +3282,7 @@ bool ObjectEffectCluster::sendFireCommand(int participantId) connect(m_mainHandler->chargeEffectHandler().get(), &AreaEffectSimulation::HandlerChargeEffect::chargeEffectActive, this, - &ObjectEffectCluster::onChargeEffectChanged, - Qt::UniqueConnection); + &ObjectEffectCluster::onChargeEffectChanged); return true; } @@ -3366,8 +3365,7 @@ bool ObjectEffectCluster::overrideEffectorStates(const AesEffectorState &newStat connect(m_mainHandler->chargeEffectHandler().get(), &AreaEffectSimulation::HandlerChargeEffect::chargeEffectActive, this, - &ObjectEffectCluster::onChargeEffectChanged, - Qt::UniqueConnection); + &ObjectEffectCluster::onChargeEffectChanged); return true; } default: @@ -3454,11 +3452,11 @@ bool ObjectEffectCluster::assignEffector(int participantId) return true; } - connect(effector, &AreaEffectSimulation::ObjectEffector::signalFired, this, &ObjectEffectCluster::onEffectorFired, Qt::UniqueConnection); - connect(effector, &AreaEffectSimulation::ObjectEffector::signalNotReadyToFire, this, &ObjectEffectCluster::onEffectorNotReadyToFire, Qt::UniqueConnection); - connect(effector, &AreaEffectSimulation::ObjectEffector::signalReadyToFire, this, &ObjectEffectCluster::onEffectorReadyToFire, Qt::UniqueConnection); - connect(effector, &AreaEffectSimulation::ObjectEffector::signalReceivedOrder, this, &ObjectEffectCluster::onEffectorReceivedOrder, Qt::UniqueConnection); - connect(effector, &AreaEffectSimulation::ObjectEffector::signalReportedFired, this, &ObjectEffectCluster::onEffectorReportedFired, Qt::UniqueConnection); + connect(effector, &AreaEffectSimulation::ObjectEffector::signalFired, this, &ObjectEffectCluster::onEffectorFired); + connect(effector, &AreaEffectSimulation::ObjectEffector::signalNotReadyToFire, this, &ObjectEffectCluster::onEffectorNotReadyToFire); + connect(effector, &AreaEffectSimulation::ObjectEffector::signalReadyToFire, this, &ObjectEffectCluster::onEffectorReadyToFire); + connect(effector, &AreaEffectSimulation::ObjectEffector::signalReceivedOrder, this, &ObjectEffectCluster::onEffectorReceivedOrder); + connect(effector, &AreaEffectSimulation::ObjectEffector::signalReportedFired, this, &ObjectEffectCluster::onEffectorReportedFired); effector->assignAesItemRequest(m_data.id); if (cadence > 0) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.cpp index 6d0b68d7f..60439c8ec 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.cpp @@ -1815,10 +1815,10 @@ void ObjectExplosionCluster::checkNextFire() { DEBUG_LOG(m_logger) << LOGFUNCTION << " " << m_data.id << " startFiring (no delay)"; - // // connect(&m_firingTimer, &FiringTimer::firing, this, &ObjectExplosionCluster::onFiringTimerFiring, Qt::UniqueConnection); - connect(&m_firingTimer, &FiringTimer::impact, this, &ObjectExplosionCluster::onFiringTimerImpact, Qt::UniqueConnection); + // // connect(&m_firingTimer, &FiringTimer::firing, this, &ObjectExplosionCluster::onFiringTimerFiring); + connect(&m_firingTimer, &FiringTimer::impact, this, &ObjectExplosionCluster::onFiringTimerImpact); // // connect(&m_firingTimer, &FiringTimer::stateChangeDelayedAsInt, - // // this, &ObjectExplosionCluster::onFiringTimerStateChangeDelayedCommandAsInt, Qt::UniqueConnection); + // // this, &ObjectExplosionCluster::onFiringTimerStateChangeDelayedCommandAsInt); m_firingTimer.startFiring(); } @@ -1827,9 +1827,9 @@ void ObjectExplosionCluster::checkNextFire() DEBUG_LOG(m_logger) << LOGFUNCTION << " " << m_data.id << " trigger startFiringDelay, delay " << delay; - connect(&m_firingTimer, &FiringTimer::firing, this, &ObjectExplosionCluster::onFiringTimerFiring, Qt::UniqueConnection); - connect(&m_firingTimer, &FiringTimer::impact, this, &ObjectExplosionCluster::onFiringTimerImpact, Qt::UniqueConnection); - connect(&m_firingTimer, &FiringTimer::stateChangeDelayedAsInt, this, &ObjectExplosionCluster::onFiringTimerStateChangeDelayedCommandAsInt, Qt::UniqueConnection); + connect(&m_firingTimer, &FiringTimer::firing, this, &ObjectExplosionCluster::onFiringTimerFiring); + connect(&m_firingTimer, &FiringTimer::impact, this, &ObjectExplosionCluster::onFiringTimerImpact); + connect(&m_firingTimer, &FiringTimer::stateChangeDelayedAsInt, this, &ObjectExplosionCluster::onFiringTimerStateChangeDelayedCommandAsInt); m_firingTimer.startFiringDelay(delay); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.cpp index 2151831a9..ee5cb1eb5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.cpp @@ -49,7 +49,7 @@ Core::FunctionReplyObject ObjectFunctionalArea::createObject(const Database::Aes m_timer = new QTimer(this); connect(m_timer, &QTimer::timeout, - this, &ObjectFunctionalArea::myTimerSlot, Qt::UniqueConnection); + this, &ObjectFunctionalArea::myTimerSlot); DEBUG_LOG(m_logger) << "connect participantPositionChanged"; connect(m_mainHandler->dds()->ppmDtc().get(), &ParticipantManagement::Interface::Dtc::participantPositionChanged, diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.cpp index ffb2c8907..39271bfe4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.cpp @@ -296,7 +296,7 @@ void MvsTests::onVideoTeamModifyReply(const Core::FunctionReplyObject &replyObje if (replyObject.error()) { ERROR_LOG(m_logger) << "Got onVideoTeamModifyReply error: " << replyObject(); - QTimer::singleShot(0, qApp, SLOT(quit())); + QTimer::singleShot(0, qApp, &QCoreApplication::quit); return; } INFO_LOG(m_logger) << "Got Reply with id " << replyObject.id() @@ -304,7 +304,7 @@ void MvsTests::onVideoTeamModifyReply(const Core::FunctionReplyObject &replyObje m_teamId = replyObject.id(); - QTimer::singleShot(0, qApp, SLOT(quit())); + QTimer::singleShot(0, qApp, &QCoreApplication::quit); } //---------------------------------------------------------------------------------- @@ -314,7 +314,7 @@ void MvsTests::onVideoReceiverModifyReply(const Core::FunctionReplyObject &reply if (replyObject.error()) { ERROR_LOG(m_logger) << "Got onVideoReceiverModifyReply error: " << replyObject(); - QTimer::singleShot(0, qApp, SLOT(quit())); + QTimer::singleShot(0, qApp, &QCoreApplication::quit); return; } INFO_LOG(m_logger) << "Got Reply with id " << replyObject.id() @@ -322,7 +322,7 @@ void MvsTests::onVideoReceiverModifyReply(const Core::FunctionReplyObject &reply m_receiverId = replyObject.id(); - QTimer::singleShot(0, qApp, SLOT(quit())); + QTimer::singleShot(0, qApp, &QCoreApplication::quit); } */ // ------------------------------------------------------------------------------ @@ -342,7 +342,7 @@ void MvsTests::onReply(const Core::FunctionReplyObject &replyObject) } INFO_LOG(m_logger) << "Got Reply with id " << replyObject.id() << " and errorString " << replyObject.translated(); -// QTimer::singleShot(0, qApp, SLOT(quit())); +// QTimer::singleShot(0, qApp, &QCoreApplication::quit); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.cpp index 45b259174..1c4c68603 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.cpp @@ -68,11 +68,11 @@ bool HandlerAesData::init() dtcAes->enableEffects(); connect(dtcAes.get(), &AreaEffectSimulation::Interface::Dtc::effectsChanged, - this, &HandlerAesData::onEffectsChanged, Qt::UniqueConnection); + this, &HandlerAesData::onEffectsChanged); dtcAes->enableBoobyTrap(); connect(dtcAes.get(), &AreaEffectSimulation::Interface::Dtc::boobyTrapChanged, - this, &HandlerAesData::onBoobyTrapChanged, Qt::UniqueConnection); + this, &HandlerAesData::onBoobyTrapChanged); // Get 'static' data for all AesItemView { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.cpp index 89e5a1471..32f8ec299 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.cpp @@ -73,7 +73,7 @@ bool HandlerExplosions::init() this, &HandlerExplosions::onExplosionSingleChanged); dtcAes->enableEffects(); connect(dtcAes.get(), &AreaEffectSimulation::Interface::Dtc::effectsChanged, - this, &HandlerExplosions::onEffectsChanged, Qt::UniqueConnection); + this, &HandlerExplosions::onEffectsChanged); connect(m_handlerParticipant.get(), &CentralEffectSimulation::HandlerParticipant::newOutdoorPosition, this, &HandlerExplosions::onNewParticipantCesPosition); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.cpp index 54116b1d0..59b64fe28 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.cpp @@ -91,7 +91,7 @@ void CesMissionPlanHandler::updateMissionPlanList(const ParticipantManagement::M obj = new CesMissionPlanObject(data, m_ddsHandler, this); connect(obj, &CesMissionPlanObject::ready2SendNextAction, this, - &CesMissionPlanHandler::onSendNextMissionAction, Qt::UniqueConnection); + &CesMissionPlanHandler::onSendNextMissionAction); const int planId = obj->planId(); std::function onDeleteObj = [this, planId]() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.cpp index 6ad6aeff4..580c87cbc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.cpp @@ -20,8 +20,7 @@ TargetTimer::TargetTimer(int participantId, m_preWarningInterval = preWarningInterval; m_timeToEffectInterval = timeToEffectInterval; timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), - this, SLOT(MyTimerSlot())); + connect(timer, &QTimer::timeout, this, &TargetTimer::MyTimerSlot); // msec } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp index 36acbb9a4..4bf5ef63c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp @@ -51,9 +51,9 @@ bool HandlerAesData::init() connect(dtcAes.get(), &AreaEffectSimulation::Interface::Dtc::explosionAreaChanged, this, &HandlerAesData::onExplosionAreaChanged); connect(dtcAes.get(), &AreaEffectSimulation::Interface::Dtc::explosionClusterChanged, - this, &HandlerAesData::onExplosionClusterChanged, Qt::UniqueConnection); + this, &HandlerAesData::onExplosionClusterChanged); connect(dtcAes.get(), &AreaEffectSimulation::Interface::Dtc::effectClusterChanged, - this, &HandlerAesData::onEffectClusterChanged, Qt::UniqueConnection); + this, &HandlerAesData::onEffectClusterChanged); connect(dtcAes.get(), &AreaEffectSimulation::Interface::Dtc::explosionSingleChanged, this, &HandlerAesData::onExplosionSingleChanged); connect(dtcAes.get(), &AreaEffectSimulation::Interface::Dtc::mineAreaChanged, diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.cpp index d7b5eb9fb..a7b015cf7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.cpp @@ -33,7 +33,7 @@ EvlTests::EvlTests(QObject *parent) qRegisterMetaType("Core::FunctionReply"); // connect(m_dtc.get(), &Interface::Dtc::evaluationCriteriumChanged, - // this, &EvlTests::onReceiveCriteriumChanged, Qt::UniqueConnection); + // this, &EvlTests::onReceiveCriteriumChanged); } // end of ctor() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.cpp index 48982839d..f8125609b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.cpp @@ -98,14 +98,14 @@ ThpScriptServer::ThpScriptServer(QObject *parent) this, [this]() { emit signalBroadcastMessage(readContentFile()); - }, Qt::UniqueConnection); + }); connect(this, &ThpScriptServer::signalBroadcastNewScriptsJsFile, this, [this]() { emit signalBroadcastMessage2(readScriptsJsFile()); - }, Qt::UniqueConnection); + }); connect(mWsSvr, &QWebSocketServer::newConnection, diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.cpp index e19dcb43d..415a4f9eb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.cpp @@ -136,7 +136,7 @@ void ObjectIed::onPublishData() case IedPairingState_def::PairedToParticipant: { ddsData.pairedParticipantId().set(m_data.pairedParticipantId.toInt()); - connect(m_ppmDtc.get(), &ParticipantManagement::Interface::Dtc::participantPositionChanged, this, &ObjectIed::onParticipantPositionChanged, Qt::UniqueConnection); + connect(m_ppmDtc.get(), &ParticipantManagement::Interface::Dtc::participantPositionChanged, this, &ObjectIed::onParticipantPositionChanged); break; } case IedPairingState_def::PairedToOps: diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.cpp index ed4d4f87f..1ec69966f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.cpp @@ -29,8 +29,7 @@ SocketHandler::SocketHandler(const std::shared_ptr &ddsHandler, m_reconnectTimer = new QTimer(this); // setup signal and slot - connect(m_reconnectTimer, SIGNAL(timeout()), - this, SLOT(reconnectTimerSlot())); + connect(m_reconnectTimer, &QTimer::timeout, this, &SocketHandler::reconnectTimerSlot); } @@ -39,11 +38,11 @@ void SocketHandler::init(QString nmeaHost, int nmeaPort) m_nmeaHost = nmeaHost; m_nmeaPort = nmeaPort; socket = new QUdpSocket(this); - connect(socket, SIGNAL(connected()), this, SLOT(connected())); - connect(socket, SIGNAL(disconnected()), this, SLOT(disconnected())); - connect(socket, SIGNAL(readyRead()), this, SLOT(readyRead())); + connect(socket, &QUdpSocket::connected, this, &SocketHandler::connected); + connect(socket, &QUdpSocket::disconnected, this, &SocketHandler::disconnected); + connect(socket, &QUdpSocket::readyRead, this, &SocketHandler::readyRead); - connect(socket, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWritten(qint64))); + connect(socket, qOverload(&QUdpSocket::bytesWritten), this, &SocketHandler::bytesWritten); INFO_LOG(m_logger) << "Connecting,.."; INFO_LOG(m_logger) << nmeaHost << " port: " << nmeaPort; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.cpp index d8d85b80e..6949b7fd0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.cpp @@ -29,7 +29,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q , m_webSocketActivityTimer(new QTimer(this)) , m_logger(getLogger("WebSocketInterfaceHandler")) { - connect(m_webSocketActivityTimer, &QTimer::timeout, this, &WebSocketInterfaceHandler::dataReceiveTimeout, Qt::UniqueConnection); + connect(m_webSocketActivityTimer, &QTimer::timeout, this, &WebSocketInterfaceHandler::dataReceiveTimeout); const int iTimeout = Settings::webSocketActivityTimeoutMSec(); if (iTimeout > 0) m_webSocketActivityTimer->setInterval(iTimeout); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_process.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_process.cpp index a0e183dcb..bfafc943e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_process.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_process.cpp @@ -158,7 +158,7 @@ bool ServiceManagement::ServiceProcess::start(OpenMode mode) m_pidProc->setProcessChannelMode(QProcess::MergedChannels); m_pidProc->disconnect(); - connect(m_pidProc, &QProcess::readyRead, this , &ServiceProcess::onDataFromPidProc, Qt::UniqueConnection); + connect(m_pidProc, &QProcess::readyRead, this , &ServiceProcess::onDataFromPidProc); QTimer::singleShot(3000, this, [this](){ m_pidProc->start(); @@ -203,7 +203,7 @@ bool ServiceManagement::ServiceProcess::start(OpenMode mode) m_pidProc->setProcessChannelMode(QProcess::MergedChannels); m_pidProc->disconnect(); - connect(m_pidProc, &QProcess::readyRead, this , &ServiceProcess::onDataFromPidProc, Qt::UniqueConnection); + connect(m_pidProc, &QProcess::readyRead, this , &ServiceProcess::onDataFromPidProc); QTimer::singleShot(9000, this, [this](){ m_pidProc->start(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.cpp index 94852741a..5b2064812 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.cpp @@ -125,7 +125,7 @@ bool ShootbackController::initDds(std::shared_ptr handlerA // ShootbackArea connect(m_handlerShootbackArea.get(), &HandlerShootbackArea::objectChanged, - this, &ShootbackController::onShootbackAreaChanged1, Qt::UniqueConnection); + this, &ShootbackController::onShootbackAreaChanged1); m_handlerShootbackArea->objectShootbackAreas([this](const TargetManagement::ObjectShootbackArea & data) { @@ -134,17 +134,17 @@ bool ShootbackController::initDds(std::shared_ptr handlerA // ShootbackTarget connect(m_handlerShootbackTarget.get(), &HandlerShootbackTarget::objectChanged, - this, &ShootbackController::onShootbackTargetChanged, Qt::UniqueConnection); + this, &ShootbackController::onShootbackTargetChanged); // TargetAreaAssignment connect(m_handlerTargetAreaAssignment.get(), &HandlerTargetAreaAssignment::objectChanged, - this, &ShootbackController::onTargetAreaAssignmentChanged, Qt::UniqueConnection); + this, &ShootbackController::onTargetAreaAssignmentChanged); // finally: // PPM: connect(m_mainHandler->dds()->dtcPpm().get(), &ParticipantManagement::Interface::Dtc::participantPositionChanged, - this, &ShootbackController::onParticipantPositionChanged, Qt::UniqueConnection); + this, &ShootbackController::onParticipantPositionChanged); return true; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.cpp index 09fc53133..0aae870b8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.cpp @@ -420,7 +420,7 @@ void DataManager::createTriggerForExercise(NSqlQuery &q, int exerciseId) // create subscription connect(driver, QOverload::of(&QSqlDriver::notification), - this, &DataManager::onNotification, Qt::UniqueConnection); + this, &DataManager::onNotification); if (!driver->subscribeToNotification(triggerNameExercise)) WARNING_LOG(m_logger) << "Error subscribing to DB notification " << triggerNameExercise;