Session 026: Lts/Services Qt5:: to Qt6:: migration

- Migrated all 104 CMakeLists.txt files in Lts/Services
- Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg,
  Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test,
  Qt5::SerialPort with Qt6:: equivalents
- 1244 files modified (CMakeLists.txt and source files)
- Zero Qt5:: references remaining in Lts/Services
- QTextCodec, QDesktopWidget: No blocking issues found
- QRegExp: 7 occurrences remain (deprecated but functional)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-25 19:23:30 +02:00
1 parent c143ff8a4f
commit d5af8b9764
1244 files changed
+4266 -4633

No files matched your search

@@ -7,7 +7,6 @@
*/
#include "group.h"
#include <utility>
#include <QtCore/QDateTime>
#include <QtCore/QThread>
@@ -40,6 +39,7 @@ Group::Group(const std::shared_ptr<DdsHandler> &ddsHandler,
, m_groupId(s_idCounter++)
, m_groupData(groupData)
, m_completeCoreTimeout(0)
, m_logger(getLogger("Group"))
{
INFO_LOG(m_logger) << "Group "
<< m_scheme->groupType
@@ -52,7 +52,7 @@ Group::Group(const std::shared_ptr<DdsHandler> &ddsHandler,
Group::~Group()
{
setRunningState(Core::RunningState::StoppedNormally);
for (ServiceProcess *serviceProc :std::as_const(m_serviceProcs))
for (ServiceProcess *serviceProc :qAsConst(m_serviceProcs))
m_ddsHandler->dts()->removeServiceInformationByKey(serviceProc->serviceProcessId());
qDeleteAll(m_serviceProcs); // in Service they are removed via ServiceProcess::destroyed signal
m_ddsHandler->dts()->removeGroupInformationByKey(m_groupId);
@@ -60,7 +60,7 @@ Group::~Group()
void Group::init()
{
for (int serviceId : std::as_const(m_scheme->services))
for (int serviceId : qAsConst(m_scheme->services))
{
if (m_serviceProcs.contains(serviceId))
continue;
@@ -92,11 +92,11 @@ bool Group::setRunningState(Core::RunningState newState)
case Core::RunningState::Starting:
// make sure all services are there
init();
for (ServiceProcess *serviceProc : std::as_const(m_serviceProcs))
for (ServiceProcess *serviceProc : qAsConst(m_serviceProcs))
serviceProc->start();
return true;
case Core::RunningState::StoppedNormally:
for (ServiceProcess *serviceProc : std::as_const(m_serviceProcs))
for (ServiceProcess *serviceProc : qAsConst(m_serviceProcs))
serviceProc->terminate();
return true;
default:
@@ -118,7 +118,7 @@ void Group::startCore()
init();
// ExerciseManagement must be started ...
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
{
if (proc->serviceName() == QLatin1String("ExerciseManagement"))
{
@@ -160,7 +160,7 @@ void Group::start()
// make sure all services are there
init();
// get list of prio
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
{
if ( !prioList.contains(proc->prio()))
{
@@ -176,7 +176,7 @@ void Group::start()
// m_actPrio = getNextPrio(prioList);
//}
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
{
if ( m_actPrio == proc->prio())
{
@@ -198,7 +198,7 @@ void Group::start()
void Group::stop()
{
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
{
if (proc->state() != QProcess::NotRunning)
proc->stopFromRequest();
@@ -209,7 +209,7 @@ void Group::restart()
{
// make sure all services are there
init();
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
proc->restart();
}
@@ -269,7 +269,7 @@ void Group::onNewServiceInfo()
m_elapsedTimer.start();
std::vector<int32_t> serviceIds;
serviceIds.reserve(m_serviceProcs.size());
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
serviceIds.push_back(proc->serviceProcessId());
GroupInformation info(m_groupId,
@@ -297,7 +297,7 @@ void Group::onCompleteCoreTick()
ServiceProcess *exmProc = nullptr;
// get EXM proc
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
{
if (proc->serviceName() == QLatin1String("ExerciseManagement"))
{
@@ -315,7 +315,7 @@ void Group::onCompleteCoreTick()
if (exmProc->runningState() == Core::RunningState::Running)
{
// get list of prio
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
{
if ( !prioList.contains(proc->prio()))
{
@@ -327,7 +327,7 @@ void Group::onCompleteCoreTick()
}
// start rest of group core
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
{
if (proc->state() != QProcess::Running && proc->prio() == m_actPrio)
{
@@ -352,7 +352,7 @@ void Group::onCompleteCoreTick()
ServiceProcess *Group::procFromPid(Q_PID pid)
{
for (ServiceProcess *proc :std::as_const(m_serviceProcs))
for (ServiceProcess *proc :qAsConst(m_serviceProcs))
{
if (proc->pid() == pid)
return proc;