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 <QtCore> from fire_automaton.h and
  aes_test_fire_automaton.h (specific includes suffice)

25 files changed, 74 insertions(+), 81 deletions(-)
This commit is contained in:
berrux-dev committed 2026-09-21 06:43:28 +00:00
1 parent 29002f2a48
commit 5485a90385
25 files changed
+74 -81

No files matched your search

@@ -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)
@@ -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)
@@ -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)
@@ -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<int32
{
FireAutomaton automaton;
QVERIFY(automaton.init(0, FireAutomaton::TimeType::Cadence, 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);
@@ -267,11 +267,11 @@ void TestFireAutomaton::testResumePaused()
FireAutomaton automaton;
QVERIFY(automaton.init(effectDurationMSecs, FireAutomaton::TimeType::Duration, numberOfRounds, effectorIds, QStringLiteral("all*")));
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());
qint64 startTimeMSecs = QDateTime::currentMSecsSinceEpoch();
@@ -309,11 +309,11 @@ void TestFireAutomaton::testStop()
QVERIFY(automaton.init(effectDurationMSecs, FireAutomaton::TimeType::Duration, numberOfRounds, effectorIds, QStringLiteral("next*")));
QTest::qWait(10);
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());
QVERIFY(automaton.start());
@@ -344,9 +344,9 @@ void TestFireAutomaton::testStates()
FireAutomaton automaton;
QSignalSpy spyFinished(&automaton, SIGNAL(finished()));
QSignalSpy spyFinished(&automaton, &FireAutomaton::finished);
QVERIFY(spyFinished.isValid());
// init
QCOMPARE(automaton.getState(), FireAutomaton::State::Uninitialized);
QVERIFY(!automaton.start());
@@ -8,7 +8,6 @@
#pragma once
#include <cstdint>
#include <QtCore>
#include <QMetaType>
#include <AreaEffectSimulation/Utils/fire_automaton.h>
@@ -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);
}
/**
@@ -5,7 +5,6 @@
* $Author$
*/
#include <QtCore>
#include <QtCore/QObject>
#include <QtCore/QTimer>
#include <QtCore/QString>
@@ -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();
@@ -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)
@@ -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);
}
@@ -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,
@@ -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);
}
@@ -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
{
@@ -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);
@@ -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<void(void)> onDeleteObj = [this, planId]()
@@ -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
}
@@ -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,
@@ -33,7 +33,7 @@ EvlTests::EvlTests(QObject *parent)
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
// connect(m_dtc.get(), &Interface::Dtc::evaluationCriteriumChanged,
// this, &EvlTests::onReceiveCriteriumChanged, Qt::UniqueConnection);
// this, &EvlTests::onReceiveCriteriumChanged);
} // end of ctor()
@@ -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,
@@ -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:
@@ -29,8 +29,7 @@ SocketHandler::SocketHandler(const std::shared_ptr<DdsHandler> &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<qint64>(&QUdpSocket::bytesWritten), this, &SocketHandler::bytesWritten);
INFO_LOG(m_logger) << "Connecting,..";
INFO_LOG(m_logger) << nmeaHost << " port: " << nmeaPort;
@@ -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);
@@ -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();
@@ -125,7 +125,7 @@ bool ShootbackController::initDds(std::shared_ptr<HandlerShootbackArea> 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<HandlerShootbackArea> 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;
}
@@ -420,7 +420,7 @@ void DataManager::createTriggerForExercise(NSqlQuery &q, int exerciseId)
// create subscription
connect(driver, QOverload<const QString &, QSqlDriver::NotificationSource, const QVariant &>::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;