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,17 +7,16 @@
*/
#include "service_handler.h"
#include <utility>
#include <QtCore/QCoreApplication>
#include <QtCore/QDateTime>
#include <QtCore/QTimer>
#include <QCoreApplication>
#include <QDateTime>
#include <QTimer>
#include "service.h"
#include "service_process.h"
#include "dds_handler.h"
#include "settings.h"
#include <LtsUtils/LtsUtilsCore/data_modification_enum.h>
#include <LtsUtilsCore/data_modification_enum.h>
ServiceManagement::ServiceHandler::ServiceHandler(const std::shared_ptr<DdsHandler> &ddsHandler,
const std::shared_ptr<LicenceDonator> &licenceDonator)
@@ -26,6 +25,7 @@ ServiceManagement::ServiceHandler::ServiceHandler(const std::shared_ptr<DdsHandl
, m_heartBeatObserverTimer(new QTimer(this))
, m_ddsHandler(ddsHandler)
, m_licenceDonator(licenceDonator)
, m_logger(getLogger("ServiceHandler"))
{
connect(qApp, &QCoreApplication::aboutToQuit,
this, &ServiceHandler::stopAllServices);
@@ -111,9 +111,9 @@ void ServiceManagement::ServiceHandler::stopAllServices()
INFO_LOG(m_logger) << "Stopping all Services ...";
// shutdown async
for (Service *service : std::as_const(m_services))
for (Service *service : qAsConst(m_services))
service->stopAllProcs();
for (Service *service : std::as_const(m_services))
for (Service *service : qAsConst(m_services))
service->waitForStopped();
INFO_LOG(m_logger) << "... all Services stopped :)";
@@ -147,9 +147,9 @@ void ServiceManagement::ServiceHandler::onNewServiceInfoFromDds(const Core::Curr
if (proc == nullptr)
{
bool found = false;
for (Service *currentService : std::as_const(m_services))
for (Service *currentService : qAsConst(m_services))
{
for (ServiceProcess *currentProc : std::as_const(currentService->allProcs()))
for (ServiceProcess *currentProc : qAsConst(currentService->allProcs()))
{
if (currentProc->remotePid() == data.pid())
{
@@ -182,7 +182,7 @@ void ServiceManagement::ServiceHandler::onNewServiceInfoFromDds(const Core::Curr
ServiceManagement::Service *ServiceManagement::ServiceHandler::serviceFromId(int id)
{
for (Service *service : std::as_const(m_services))
for (Service *service : qAsConst(m_services))
{
if (service->id() == id)
return service;
@@ -192,7 +192,7 @@ ServiceManagement::Service *ServiceManagement::ServiceHandler::serviceFromId(int
ServiceManagement::ServiceProcess *ServiceManagement::ServiceHandler::serviceProcessFromPid(qint64 pid)
{
for (Service *service : std::as_const(m_services))
for (Service *service : qAsConst(m_services))
{
ServiceProcess *result = service->procFromPid(pid);
if (result)
@@ -203,7 +203,7 @@ ServiceManagement::ServiceProcess *ServiceManagement::ServiceHandler::servicePro
ServiceManagement::ServiceProcess *ServiceManagement::ServiceHandler::serviceProcessFromServiceProcId(int32_t id)
{
for (Service *service : std::as_const(m_services))
for (Service *service : qAsConst(m_services))
{
ServiceProcess *result = service->procFromServiceProcId(id);
if (result)
@@ -218,9 +218,9 @@ void ServiceManagement::ServiceHandler::onHeartBeatObserverTimerTimeout()
const qint64 minHeartbeatAge = tNow - HEARTBEAT_OBSERVER_INTERVAL;
const qint64 minHeartbeatAgeStartup = tNow - HEARTBEAT_OBSERVER_INTERVAL * 6;
for (Service *currentService : std::as_const(m_services))
for (Service *currentService : qAsConst(m_services))
{
for (ServiceProcess *currentProc : std::as_const(currentService->allProcs()))
for (ServiceProcess *currentProc : qAsConst(currentService->allProcs()))
{
// dev mode for this proc -> we're not repsonsible for
if (currentProc->devMode())