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

@@ -43,7 +43,6 @@ NGL_TARGET_LINK_LIBRARIES(rscCommon
#NGL_ADD_SVC_ICON(SRCS_exe)
#NGL_ADD_EXECUTABLE(AAR SV svcRoutingServiceNG ${SRCS_exe})
#IF(BUILD_RTI)
#NGL_TARGET_LINK_LIBRARIES(svcRoutingServiceNG
# rscCommon
# Qt6::Core
@@ -61,7 +60,6 @@ NGL_TARGET_LINK_LIBRARIES(rscCommon
# svcCoreClient
# svcExmClient
#)
#ENDIF(BUILD_RTI)
#NGL_INSTALL_TARGET(svcRoutingServiceNG)
#NGL_INSTALL(AAR SV FILES log4cxx_rsc.props DESTINATION bin)
#NGL_ADD_TARGET_LINK(svcRoutingServiceNG sRSC)
@@ -10,8 +10,7 @@
#include "connection.h"
#include "data_writer_task.h"
#if BUILD_RTI
#include <QtCore/QCoreApplication>
#include <QCoreApplication>
#include <QElapsedTimer>
#include <DDS/DDSConnector/publisher.h>
@@ -187,4 +186,3 @@ bool Connection::initTopics()
}
} // namespace RoutingService
#endif // BUILD_RTI
@@ -8,7 +8,6 @@
#pragma once
#if BUILD_RTI
#include <DDS/DDSConnector/dds_connector.h>
#include <future>
@@ -42,7 +41,6 @@ private:
bool initTopics();
private:
NGL::INGLLogger &m_logger;
Connection *m_output;
dds::domain::DomainParticipant m_domainParticipant;
std::unique_ptr<DDSConnector::Publisher> m_publisher;
@@ -55,8 +53,7 @@ private:
std::string m_partition;
std::string m_description;
NGL::INGLLogger &m_logger;
};
} // namespace RoutingService
#endif // BUILD_RTI
@@ -11,15 +11,14 @@
namespace RoutingService
{
DataWriterTask::DataWriterTask()
: m_logger(getLogger("DataWriterTask"))
, m_doShutdown(false)
: m_doShutdown(false)
, m_logger(getLogger("DataWriterTask"))
{
DEBUG_LOG(m_logger) << this << ": init ";
}
DataWriterTask::~DataWriterTask()
{
#if BUILD_RTI
std::lock_guard<std::mutex> lock(m_queueLock);
DEBUG_LOG(m_logger) << this << ": Cleaning up remaining writers: " << m_writerQueue.size();
while (!m_writerQueue.empty())
@@ -27,10 +26,8 @@ DataWriterTask::~DataWriterTask()
delete m_writerQueue.front();
m_writerQueue.pop();
}
#endif
}
#if BUILD_RTI
void DataWriterTask::enqueue(SampleWriterInterface *swi)
{
std::lock_guard<std::mutex> lock(m_queueLock);
@@ -104,6 +101,5 @@ void DataWriterTask::writeSamples()
}
}
}
#endif // BUILD_RTI
} // namespace RoutingService
@@ -11,15 +11,10 @@
#include <queue>
#include <mutex>
#include <condition_variable>
#include <DDS/Routing/routing_plugin.h>
#include "logger.h"
#if BUILD_RTI
#include <DDS/Routing/routing_plugin.h>
#else
#include "stubs/routing_plugin_stub.h"
#endif
namespace RoutingService
{
class DataWriterTask final : public DataWriterTaskInterface
@@ -28,30 +23,19 @@ public:
DataWriterTask();
~DataWriterTask();
#if BUILD_RTI
void enqueue(SampleWriterInterface *swi) override;
void shutdown();
bool waitForData();
SampleWriterInterface *getNextSampleWriter();
void writeSamples();
#else
// Stub methods when BUILD_RTI is disabled
void enqueue(SampleWriterInterface* /*swi*/) {}
void shutdown() {}
bool waitForData() { return false; }
SampleWriterInterface* getNextSampleWriter() { return nullptr; }
void writeSamples() {}
#endif
private:
NGL::INGLLogger &m_logger;
#if BUILD_RTI
std::queue<SampleWriterInterface *> m_writerQueue;
#endif
std::mutex m_queueLock;
std::condition_variable m_waitForDataCondition;
bool m_doShutdown;
NGL::INGLLogger &m_logger;
};
} // namespace RoutingService
@@ -10,7 +10,7 @@
#pragma once
#include <NGLLogger/INGLLogger.h>
#include "rsccommon_export.h"
#include <RoutingServiceNG/rsccommon_export.h>
namespace RoutingService
{
@@ -19,7 +19,6 @@
#include <DDS/Core/pacemaker.h>
#include <DDS/DTS/generic_dts_impl.h>
#if BUILD_RTI
namespace RoutingService
{
@@ -103,4 +102,3 @@ void MainHandler::shutdown()
}
} // namespace RoutingService
#endif // BUILD_RTI
@@ -8,12 +8,9 @@
#pragma once
#include <QtCore/QObject>
#include <QObject>
#include "logger.h"
#if BUILD_RTI
#include "partition_handler.h"
#include "session_handler.h"
#include "session.h"
@@ -39,11 +36,10 @@ public:
private:
NGL::INGLLogger &m_logger;
std::unique_ptr<SessionHandler> m_sessionHandler;
std::unique_ptr<PartitionHandler> m_partitionHandler;
std::shared_ptr<Core::Pacemaker> m_pacemaker;
NGL::INGLLogger &m_logger;
};
} // namespace RoutingService
#endif // BUILD_RTI
@@ -9,13 +9,14 @@
#include "partition_handler.h"
#include <DDS/DDSConnector/dds_connector.h>
#if BUILD_RTI
namespace RoutingService
{
PartitionHandler::PartitionHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector, QObject *parent) : QObject(parent)
PartitionHandler::PartitionHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector, QObject *parent)
: QObject(parent)
, m_exmDtc(ExerciseManagement::Interface::Dtc::create(ddsConnector))
, m_destroyTimer(new QTimer(this)),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
, m_destroyTimer(new QTimer(this))
, m_logger(getLogger("PartitionHandler"))
{
m_exmDtc->enableExercise();
m_destroyTimer->setInterval(1000);
@@ -102,4 +103,3 @@ void PartitionHandler::onDestroyTimerTimeout()
} // namespace RoutingService
#endif // BUILD_RTI
@@ -8,14 +8,11 @@
#pragma once
#if BUILD_RTI
#include <QElapsedTimer>
#include <QtCore/QObject>
#include <QtCore/QSet>
#include <QtCore/QTimer>
#include <QObject>
#include <QSet>
#include <QTimer>
#include <ExerciseManagement/exm_dtc.h>
#include <DDS/DDSConnector/dds_connector.h>
#include "logger.h"
namespace RoutingService
@@ -31,7 +28,6 @@ public:
bool init();
private:
NGL::INGLLogger &m_logger;
void partitionModified(const QString &partitionName, const ExerciseManagement::ExerciseState &state);
void partitionRemoved(const QString &partitionName);
private Q_SLOTS:
@@ -42,12 +38,10 @@ Q_SIGNALS:
void destroySession(const QString &partitionNameSv, const QString &partitionNameWs);
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
QMap<QString, QElapsedTimer *> m_destroyMap;
QSet<QString> m_activeSessions;
QTimer *m_destroyTimer;
NGL::INGLLogger &m_logger;
};
} // namespace RoutingService
#endif // BUILD_RTI
@@ -9,15 +9,13 @@
#include "session.h"
#if BUILD_RTI
namespace RoutingService
{
Session::Session(const QString &partitionNameSv, const QString &partitionNameWs)
: m_partitionNameSv(partitionNameSv.toStdString())
, m_partitionNameWs(partitionNameWs.toStdString())
, m_logger(getLogger("Session"))
{
}
{}
Session::~Session()
{
@@ -58,4 +56,3 @@ void Session::shutdown()
} // namespace RoutingService
#endif // BUILD_RTI
@@ -9,13 +9,7 @@
#pragma once
#include <string>
#include <QtCore/QString>
#include "logger.h"
#if BUILD_RTI
#include "connection.h"
#endif
namespace RoutingService
{
@@ -25,21 +19,18 @@ public:
explicit Session(const QString &partitionNameSv, const QString &partitionNameWs);
~Session();
#if BUILD_RTI
bool init(const dds::domain::DomainParticipant &dpIn,
const dds::domain::DomainParticipant &dpOut,
const std::vector<TopicDispatcherInterface *> &topicsToRouteToWs,
const std::vector<TopicDispatcherInterface *> &topicsToRouteToSv);
void shutdown();
#endif
private:
NGL::INGLLogger &m_logger;
std::string m_partitionNameSv;
std::string m_partitionNameWs;
#if BUILD_RTI
std::unique_ptr<Connection> m_connectionSvToWs;
std::unique_ptr<Connection> m_connectionWsToSv;
#endif
NGL::INGLLogger &m_logger;
};
} // namespace RoutingService
@@ -9,14 +9,9 @@
#include "session_handler.h"
#include <LtsPluginManager/lts_plugin_loader.h>
#if BUILD_RTI
#include <DDS/Generic/topic_type_plugin.h>
#else
#include "stubs/topic_type_plugin_stub.hpp"
#endif
#include <QtCore/QVector>
#include <QVector>
#if BUILD_RTI
namespace RoutingService
{
@@ -26,6 +21,7 @@ SessionHandler::SessionHandler(IDL::PartitionType partitionType,
: m_partitionType(partitionType)
, m_ddsConnectorSv(ddsConnectorSv)
, m_ddsConnectorWs(ddsConnectorWs)
, m_logger(getLogger("SessionHandler"))
{
}
@@ -142,4 +138,3 @@ std::vector<TopicDispatcherInterface *> SessionHandler::topicsToRouteToSv() cons
}
} // namespace RoutingService
#endif // BUILD_RTI
@@ -8,15 +8,12 @@
#pragma once
#include <QtCore/QObject>
#include <QtCore/QMap>
#include <QObject>
#include <QMap>
#include "rsccommon_export.h"
#include <RoutingServiceNG/rsccommon_export.h>
#include "logger.h"
#include "session.h"
#if BUILD_RTI
#include <DDS/DDSConnector/dds_connector.h>
namespace LtsPluginManager
@@ -47,7 +44,6 @@ public Q_SLOTS:
void onCreateSession(const QString &partitionNameSv, const QString &partitionNameWs);
void onDestroySession(const QString &partitionNameSv, const QString &partitionNameWs);
private:
NGL::INGLLogger &m_logger;
bool loadPlugins();
bool loadPlugin(const LtsPluginManager::PluginInstance &pi);
@@ -55,7 +51,6 @@ private:
std::vector<TopicDispatcherInterface *> topicsToRouteToSv() const;
private:
NGL::INGLLogger &m_logger;
std::vector<DDSGeneric::TopicTypePlugin *> m_topicTypePlugins;
IDL::PartitionType m_partitionType;
@@ -63,7 +58,7 @@ private:
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnectorWs;
QMap<QString, Session *> m_sessionMap;
NGL::INGLLogger &m_logger;
};
} // namespace RoutingService
#endif // BUILD_RTI