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

@@ -33,13 +33,12 @@ RTIDDSGEN(SRCS_common rec_enums.idl)
# Generate rec_dt[s,c]_types.h, rec_ft[s,c]_types.h
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV WS svcRecCommon SHARED ${SRCS_common})
NGL_ADD_LIBRARY(AAR SV WS svcRecCommon SHARED ${SRCS_common})
NGL_TARGET_INCLUDE_DIRECTORIES(svcRecCommon
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
IF(BUILD_RTI)
NGL_TARGET_LINK_LIBRARIES(svcRecCommon
PRIVATE
RTI::nddscpp2
@@ -50,7 +49,6 @@ NGL_TARGET_LINK_LIBRARIES(svcRecCommon
ddscore
NGLLogger
)
ENDIF(BUILD_RTI)
NGL_INSTALL_TARGET(svcRecCommon)
#
@@ -60,7 +58,7 @@ NGL_INSTALL_TARGET(svcRecCommon)
# rec_export.h
#)
#NGL_ADD_LIBRARY2(AAR SV svcRecServer SHARED ${SRCS_server})
#NGL_ADD_LIBRARY(AAR SV svcRecServer SHARED ${SRCS_server})
#NGL_TARGET_INCLUDE_DIRECTORIES(svcRecServer
# PUBLIC
# ${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -5,7 +5,6 @@
* $Author$
*/
#include "db_writer.h"
#include <utility>
#include "db_writer_snapshot.h"
#include "rec_db.h"
@@ -13,7 +12,7 @@
#include "settings.h"
#include <DDS/DDSConnector/dds_connector.h>
#include <QtCore/QThread>
#include <QThread>
#include <ngldb/dbtransaction.h>
@@ -23,12 +22,14 @@
namespace RecordingManagement
{
DbWriter::DbWriter(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector) : m_query(nullptr)
DbWriter::DbWriter(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
: m_query(nullptr)
, m_recordTimer(new QTimer(this))
, m_ddsConnector(ddsConnector)
, m_dbWriterSnapshot(nullptr)
, m_dbWriterSnapshotThread(nullptr),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
, m_dbWriterSnapshotThread(nullptr)
, m_logger(getLogger("DbWriter"))
{}
DbWriter::~DbWriter()
{
@@ -118,7 +119,7 @@ void DbWriter::ddsTopicsToDatabase()
QHash<QString, qint64> minRecordSampleTimes;
// for each plugin
for (RecordReplay::RecordReplayPlugin *recPlugin : std::as_const(m_plugins))
for (RecordReplay::RecordReplayPlugin *recPlugin : qAsConst(m_plugins))
{
if (!recPlugin->ddsTopicsToDatabase(*m_query, minRecordSampleTimes))
{
@@ -6,9 +6,9 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QtCore/QTimer>
#include <QtCore/QVector>
#include <QObject>
#include <QTimer>
#include <QVector>
#include <PluginInterfaces/record_replay_plugin.h>
#include <ngldb/nsqlquery.h>
@@ -35,7 +35,6 @@ public:
bool init(const std::shared_ptr<DatabaseInterface> &db);
protected:
NGL::INGLLogger &m_logger;
bool initSnapshot();
bool loadPlugin(const LtsPluginManager::PluginInstance &pi);
@@ -50,5 +49,7 @@ private:
DbWriterSnapshot *m_dbWriterSnapshot{nullptr};
DbWriterSnapshotThread *m_dbWriterSnapshotThread{nullptr};
std::shared_ptr<DatabaseInterface> m_db;
LOGGER_T m_logger;
};
} // namespace RecordingManagement
@@ -5,13 +5,12 @@
* $Author$
*/
#include "db_writer_snapshot.h"
#include <utility>
#include "logger.h"
#include <QtSql/QSqlError>
#include <QtCore/QTimer>
#include <QtCore/QVariant>
#include <QSqlError>
#include <QTimer>
#include <QVariant>
#include <nglsettings/nglsettings_settings.h>
#include <ngldb/dbtransaction.h>
@@ -36,12 +35,14 @@ void DbWriterSnapshotThread::run()
DbWriterSnapshot::DbWriterSnapshot(const QVector<RecordReplay::RecordReplayPlugin *> &plugins,
int exerciseId,
NGL::Settings *settings) : QObject()
NGL::Settings *settings)
: QObject()
, m_plugins(plugins)
, m_snapshotInterval(1 * 60 * 1000) // TODO: make config variable // Interval: 1 min in milliseconds
, m_exerciseId(exerciseId)
, m_settings(settings),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
, m_settings(settings)
, m_logger(getLogger("DbWriterSnapshot"))
{
}
DbWriterSnapshot::~DbWriterSnapshot()
@@ -162,7 +163,7 @@ void DbWriterSnapshot::initSnapshot()
// Recording already initialised => read last arrays for each plugin/topic to
// get a hint where to start with indexing each topic
for (RecordReplay::RecordReplayPlugin *recPlugin : std::as_const(m_plugins))
for (RecordReplay::RecordReplayPlugin *recPlugin : qAsConst(m_plugins))
{
// get all record topics and check if there's a index for them
// if not -> check if there's a sample for this topic where we've to start indexing
@@ -226,7 +227,7 @@ void DbWriterSnapshot::writeSnapshotData()
// shortcut to avoid DBTransaction and loop over all plugins
qint64 startTime = std::numeric_limits<qint64>::max();
for(const qint64 st : std::as_const(minRecSampleTimes))
for(const qint64 st : qAsConst(minRecSampleTimes))
startTime = std::min(startTime, st);
INFO_LOG(m_logger) << "writeSnapshotData - lastSnapshotTimeToGenerateNow: " << lastSnapshotTimeToGenerateNow
<< ", minRecTime is " << startTime;
@@ -250,7 +251,7 @@ void DbWriterSnapshot::writeSnapshotData()
<< " lastSnapshotTimeToGenerateNow: " << lastSnapshotTimeToGenerateNow << " - BEGIN";
DBTransaction trans(QSqlDatabase::database(dbConnectionName()));
NSqlQuery recSnapshotQuery(QSqlDatabase::database(dbConnectionName()));
for (RecordReplay::RecordReplayPlugin *recPlugin : std::as_const(m_plugins))
for (RecordReplay::RecordReplayPlugin *recPlugin : qAsConst(m_plugins))
writeSnapshotDataPlugin(lastSnapshotTimeToGenerateNow, recSnapshotQuery, recPlugin, minRecSampleTimes);
trans.commit();
@@ -6,10 +6,10 @@
*/
#pragma once
#include <QtCore/QHash>
#include <QtCore/QMutex>
#include <QtCore/QThread>
#include <QtCore/QVector>
#include <QHash>
#include <QMutex>
#include <QThread>
#include <QVector>
#include <memory>
#include "logger.h"
@@ -62,6 +62,7 @@ private:
std::shared_ptr<DatabaseInterface> m_dbInterface;
int m_exerciseId;
NGL::Settings *m_settings;
LOGGER_T m_logger;
};
@@ -74,7 +75,6 @@ public:
, m_dbWriterSnapshot(dbWriterSnapshot)
{}
protected:
NGL::INGLLogger &m_logger;
void run() override final;
private:
DbWriterSnapshot *m_dbWriterSnapshot;
@@ -15,6 +15,7 @@ namespace RecordingManagement
DdsHandler::DdsHandler(int domainId, int exerciseId)
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
, m_logger(getLogger("DdsHandler"))
{
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
}
@@ -33,9 +33,10 @@ public:
std::shared_ptr<DDSConnector::DdsConnector> dds() const { return m_ddsConnector; }
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
std::shared_ptr<Core::Pacemaker> m_pacemaker;
NGL::INGLLogger &m_logger;
};
}
@@ -9,7 +9,7 @@
#pragma once
#include <NGLLogger/INGLLogger.h>
#include "svcreccommon_export.h"
#include "rec_export.h"
namespace RecordingManagement
{
@@ -31,10 +31,10 @@ public:
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<DdsHandler> m_ddsHandler;
std::shared_ptr<DbHandler> m_dbHandler;
std::shared_ptr<DbWriter> m_dbWriter;
LOGGER_T m_logger;
};
} // namespace RecordingManagement
@@ -6,7 +6,7 @@
*/
#pragma once
#include <QtCore/QString>
#include <QString>
namespace NGL
{