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

@@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
# generate asm_[d|f]tc.h
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV WS HLA svcAsmCommon SHARED ${SRCS_common})
NGL_ADD_LIBRARY(AAR SV WS HLA svcAsmCommon SHARED ${SRCS_common})
NGL_TARGET_INCLUDE_DIRECTORIES(svcAsmCommon
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
IF(BUILD_RTI)
NGL_TARGET_LINK_LIBRARIES(svcAsmCommon
PRIVATE
RTI::nddscpp2
@@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAsmCommon
ddscore
NGLLogger
)
ENDIF(BUILD_RTI)
NGL_INSTALL_TARGET(svcAsmCommon)
#
@@ -62,14 +60,13 @@ SET(SRCS_client
# generate asm_ftc_impl.[cpp|h]
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY2(WS AAR SV svcAsmClient SHARED ${SRCS_client})
NGL_ADD_LIBRARY(WS AAR SV svcAsmClient SHARED ${SRCS_client})
NGL_TARGET_INCLUDE_DIRECTORIES(svcAsmClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
IF(BUILD_RTI)
NGL_TARGET_LINK_LIBRARIES(svcAsmClient
PRIVATE
RTI::nddscpp2
@@ -78,7 +75,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAsmClient
svcAsmCommon
ddsftc
)
ENDIF(BUILD_RTI)
NGL_INSTALL_TARGET(svcAsmClient)
#
@@ -91,14 +87,13 @@ SET(SRCS_server
# generate asm_[d|f]ts.h, asm_[d|f]ts_impl.[cpp|h]
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
NGL_ADD_LIBRARY2(WS AAR SV svcAsmServer SHARED ${SRCS_server})
NGL_ADD_LIBRARY(WS AAR SV svcAsmServer SHARED ${SRCS_server})
NGL_TARGET_INCLUDE_DIRECTORIES(svcAsmServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
IF(BUILD_RTI)
NGL_TARGET_LINK_LIBRARIES(svcAsmServer
PRIVATE
RTI::nddscpp2
@@ -108,7 +103,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAsmServer
svcAsmCommon
ngldb
)
ENDIF(BUILD_RTI)
NGL_INSTALL_TARGET(svcAsmServer)
#
@@ -9,8 +9,8 @@
#include <nglapplication/nglcoreapplication.h>
#include <LtsCommandLineParser/LtsCommandLineParser.h>
#include <QtCore/QTimer>
#include <QtTest/QTest>
#include <QTimer>
#include <QTest>
#include <AssetManagement/asm_ftc.h>
@@ -32,6 +32,7 @@ AsmTests::AsmTests(QObject *parent)
, m_trainingAreaId(0)
, m_testId(0)
, m_bTestsSuccessful(true)
, m_logger(getLogger("Test"))
{
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
}
@@ -12,7 +12,7 @@
#include <AssetManagement/logger.h>
#include <DDS/DDSConnector/dds_connector.h>
#include <QtCore/QObject>
#include <QObject>
namespace AssetManagement
{
@@ -47,12 +47,14 @@ LtsWebSocket::AbstractClientMessage *ClientMessageFactory::createMessage(LtsWebS
ClientMessage::ClientMessage(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid, const QJsonValue &data)
: LtsWebSocket::AbstractClientMessage(client, type, typeId, uuid, data)
, m_dataManager(dataManager)
, m_logger(getLogger("ClientMessage"))
{}
// ####### ClientMessage end #######
// ####### BaseDlRequest begin #######
BaseDlRequest::BaseDlRequest(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid) : ClientMessage(dataManager, client, type, typeId, uuid),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
BaseDlRequest::BaseDlRequest(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid)
: ClientMessage(dataManager, client, type, typeId, uuid)
{}
void BaseDlRequest::process()
{
@@ -10,8 +10,8 @@
#include <LtsWebSocket/reply_message.h>
#include <QtCore/QJsonArray>
#include <QtCore/QString>
#include <QJsonArray>
#include <QString>
namespace AssetManagement
{
@@ -8,7 +8,7 @@
*/
#pragma once
#include <QtCore/QString>
#include <QString>
#include <OcBaseDownload/WebSocketInterface/json_keys.h>
@@ -24,6 +24,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q
, m_messageFactory(nullptr)
, m_dataManager(nullptr)
, m_mainHandler(mainHandler)
, m_logger(getLogger("WebSocketInterfaceHandler"))
{
}
@@ -10,7 +10,7 @@
#include <AssetManagement/asm_db.h>
#include <AssetManagement/asm.hpp>
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
#include <LtsUtilsCore/dds_vector.h>
namespace AssetManagement
{
@@ -15,6 +15,7 @@ namespace AssetManagement
DdsHandler::DdsHandler(int domainId)
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Any))
, m_logger(getLogger("DdsHandler"))
{
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
}
@@ -37,12 +37,13 @@ public:
std::shared_ptr<AssetManagement::Interface::Fts> fts() const { return m_ddsFts; }
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
std::shared_ptr<Core::Pacemaker> m_pacemaker;
std::shared_ptr<Core::TopicLockMaster> m_topicLockMaster;
std::shared_ptr<AssetManagement::Interface::Dts> m_ddsDts;
std::shared_ptr<AssetManagement::Interface::Fts> m_ddsFts;
NGL::INGLLogger &m_logger;
};
}
@@ -18,6 +18,7 @@ HandlerAsset::HandlerAsset(MainHandler *mainHandler, QObject *parent)
, Interface::Fts::AssetModifyRequestHandler(mainHandler->dds()->fts())
, Interface::Fts::AssetRemoveRequestHandler(mainHandler->dds()->fts())
, m_mainHandler(mainHandler)
, m_logger(getLogger("HandlerAsset"))
{
}
@@ -7,8 +7,8 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QtCore/QHash>
#include <QObject>
#include <QHash>
#include "dds_handler.h"
#include "logger.h"
@@ -30,7 +30,6 @@ public:
bool init();
private:
NGL::INGLLogger &m_logger;
void onAssetModifyRequest(const rti::core::SampleIdentity &cookie,
const Asset &request) override;
Core::FunctionReplyObject assetModifyRequest(const Asset &request);
@@ -38,8 +37,9 @@ private:
const Core::RemoveElementRequest &request) override;
private:
NGL::INGLLogger &m_logger;
QHash<int, ObjectAsset *> m_objectAssetMap;
MainHandler *m_mainHandler;
NGL::INGLLogger &m_logger;
};
}
@@ -31,6 +31,7 @@ static inline Location toDdsData(const Database::AsmLocation &dbData)
HandlerLocation::HandlerLocation(MainHandler *mainHandler)
: m_mainHandler(mainHandler)
, m_logger(getLogger("HandlerLocation"))
{
}
@@ -19,7 +19,8 @@ public:
bool init();
private:
NGL::INGLLogger &m_logger;
MainHandler *m_mainHandler;
NGL::INGLLogger &m_logger;
};
}
@@ -18,6 +18,7 @@ HandlerRelayInfo::HandlerRelayInfo(MainHandler *mainHandler, QObject *parent)
, Interface::Fts::RelayInfoModifyRequestHandler(mainHandler->dds()->fts())
, Interface::Fts::RelayInfoRemoveRequestHandler(mainHandler->dds()->fts())
, m_mainHandler(mainHandler)
, m_logger(getLogger("HandlerRelayInfo"))
{
}
@@ -7,8 +7,8 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QtCore/QHash>
#include <QObject>
#include <QHash>
#include "dds_handler.h"
#include "logger.h"
@@ -30,7 +30,6 @@ public:
bool init();
private:
NGL::INGLLogger &m_logger;
void onRelayInfoModifyRequest(const rti::core::SampleIdentity &cookie,
const RelayInfo &request) override;
Core::FunctionReplyObject relayInfoModifyRequest(const RelayInfo &request);
@@ -38,8 +37,9 @@ private:
const Core::RemoveElementRequest &request) override;
private:
NGL::INGLLogger &m_logger;
QHash<int, ObjectRelayInfo*> m_objectRelayInfoMap;
MainHandler *m_mainHandler;
NGL::INGLLogger &m_logger;
};
}
@@ -7,7 +7,6 @@
*/
#include "handler_training_area.h"
#include <utility>
#include "object_training_area.h"
#include "main_handler.h"
#include "convert_db_to_dds.h"
@@ -23,6 +22,7 @@ HandlerTrainingArea::HandlerTrainingArea(MainHandler *mainHandler, QObject *pare
, Interface::Fts::MapDescriptionModifyRequestHandler(mainHandler->dds()->fts())
, Interface::Fts::MapDescriptionRemoveRequestHandler(mainHandler->dds()->fts())
, m_mainHandler(mainHandler)
, m_logger(getLogger("HandlerTrainingArea"))
{
}
@@ -46,7 +46,7 @@ bool HandlerTrainingArea::init()
return false;
}
for (const Database::AsmMapDescription &data : std::as_const(dataVecMD))
for (const Database::AsmMapDescription &data : qAsConst(dataVecMD))
{
ObjectMapDescription *ifs(new ObjectMapDescription(m_mainHandler));
Core::FunctionReplyObject ret = ifs->createObject(convert(data), data.objOrder);
@@ -94,7 +94,7 @@ bool HandlerTrainingArea::init()
}
// create asm_training_area
for (const Database::AsmTrainingArea &data : std::as_const(dataVec))
for (const Database::AsmTrainingArea &data : qAsConst(dataVec))
{
// insert sequences of map descriptions in data
ObjectTrainingArea *ifs(new ObjectTrainingArea(m_mainHandler));
@@ -7,9 +7,9 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QtCore/QMap>
#include <QtCore/QVector>
#include <QObject>
#include <QMap>
#include <QVector>
#include "asm_db_structs.h"
#include "object_map_description.h"
@@ -45,7 +45,6 @@ public:
bool init();
private:
NGL::INGLLogger &m_logger;
void onTrainingAreaModifyRequest(const rti::core::SampleIdentity &cookie,
const TrainingArea &request) override;
Core::FunctionReplyObject trainingAreaModifyRequest(const TrainingArea &request);
@@ -59,9 +58,10 @@ private:
const Core::RemoveElementRequest &request) override;
private:
NGL::INGLLogger &m_logger;
QMap<int, ObjectTrainingArea *> m_objectTrainingAreaMap;
QMap<int, ObjectMapDescription *> m_objectMapDescriptionMap;
MainHandler *m_mainHandler;
NGL::INGLLogger &m_logger;
};
}
@@ -11,7 +11,7 @@
#include "main_handler.h"
#include "dds_handler.h"
#include <QtCore/QTimer>
#include <QTimer>
namespace AssetManagement
{
@@ -21,6 +21,7 @@ constexpr int MAX_DATATOPIC_LIFETIME = 10 * 1000; //10 sec
HandlerWorkstationLogout::HandlerWorkstationLogout(MainHandler *mainHandler, QObject *parent)
: QObject(parent)
, Interface::Fts::WorkstationLogoutRequestHandler(mainHandler->dds()->fts())
, m_logger(getLogger("HandlerWorkstationLogout"))
, m_mainHandler(mainHandler)
{
}
@@ -9,8 +9,8 @@
#pragma once
#include <QtCore/QObject>
#include <QtCore/QMap>
#include <QObject>
#include <QMap>
#include "dds_handler.h"
#include "logger.h"
@@ -34,8 +34,7 @@ public:
void onWorkstationLogoutRequest(const rti::core::SampleIdentity &cookie, const WorkstationLogout &request) override final;
private:
NGL::INGLLogger &m_logger;
NGL::INGLLogger &m_logger;
MainHandler *m_mainHandler;
QMap<int, QTimer*> m_logoutRequestMap;
};
@@ -9,7 +9,7 @@
#pragma once
#include <NGLLogger/INGLLogger.h>
#include "svcasmcommon_export.h"
#include "asm_export.h"
namespace AssetManagement
{
@@ -21,7 +21,8 @@
namespace AssetManagement
{
MainHandler::MainHandler(QObject *parent) : QObject(parent)
MainHandler::MainHandler(QObject *parent)
: QObject(parent)
, m_handlerTrainingArea(nullptr)
, m_handlerWorkstationLogout(nullptr)
, m_handlerAsset(nullptr)
@@ -29,8 +30,9 @@ MainHandler::MainHandler(QObject *parent) : QObject(parent)
, m_handlerRelayInfo(nullptr)
, m_ddsHandler(nullptr)
, m_dbHandler(nullptr)
, m_handlerWebSocket(nullptr),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
, m_handlerWebSocket(nullptr)
, m_logger(getLogger("MainHandler"))
{}
MainHandler::~MainHandler()
{
@@ -6,7 +6,7 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QObject>
#include <memory>
#include "dds_handler.h"
@@ -44,10 +44,8 @@ public:
int exerciseId() const;
private:
NGL::INGLLogger &m_logger;
bool initAsmHandler();
private:
NGL::INGLLogger &m_logger;
// std::shared_ptr<HandlerMapDescription> m_handlerMapDesc;
std::shared_ptr<HandlerTrainingArea> m_handlerTrainingArea;
std::shared_ptr<HandlerWorkstationLogout> m_handlerWorkstationLogout;
@@ -57,5 +55,8 @@ private:
std::shared_ptr<DdsHandler> m_ddsHandler;
std::shared_ptr<DbHandler> m_dbHandler;
std::shared_ptr<WebSocketInterface::WebSocketInterfaceHandler> m_handlerWebSocket;
NGL::INGLLogger &m_logger;
};
} // namespace AssetManagement
@@ -15,8 +15,10 @@
//------------------------------------------------------------------------------
namespace AssetManagement
{
ObjectAsset::ObjectAsset(MainHandler *mainHandler) : m_mainHandler(mainHandler),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
ObjectAsset::ObjectAsset(MainHandler *mainHandler)
: m_mainHandler(mainHandler)
, m_logger(getLogger("ObjectAsset"))
{
}
//------------------------------------------------------------------------------
@@ -10,7 +10,7 @@
#include "dds_handler.h"
#include "logger.h"
#include <Core/core_types.h>
#include <DDS/Core/function_reply_object.h>
// Generated
#include <AssetManagement/asm_db.h>
@@ -47,11 +47,12 @@ public:
static Asset toDdsData(const Database::AsmAsset &dbData); // db -> dds
protected:
NGL::INGLLogger &m_logger;
void onPublishData();
private:
MainHandler *m_mainHandler;
Asset m_data;
NGL::INGLLogger &m_logger;
};
}
@@ -12,9 +12,11 @@
namespace AssetManagement
{
ObjectMapDescription::ObjectMapDescription(MainHandler *mainHandler) : m_mainHandler(mainHandler)
, m_order(-1),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
ObjectMapDescription::ObjectMapDescription(MainHandler *mainHandler)
: m_mainHandler(mainHandler)
, m_order(-1)
, m_logger(getLogger("ObjectMapDescription"))
{
}
bool ObjectMapDescription::isValid() const
@@ -8,7 +8,7 @@
#pragma once
#include "logger.h"
#include <Core/core_types.h>
#include <DDS/Core/function_reply_object.h>
// Generated
#include <AssetManagement/asm_db.h>
@@ -38,9 +38,9 @@ public:
static MapDescription toDdsData(const Database::AsmMapDescription &dbData); // db -> dds
private:
NGL::INGLLogger &m_logger;
MainHandler *m_mainHandler;
MapDescription m_data;
int m_order;
NGL::INGLLogger &m_logger;
};
}
@@ -15,8 +15,10 @@
//------------------------------------------------------------------------------
namespace AssetManagement
{
ObjectRelayInfo::ObjectRelayInfo(MainHandler *mainHandler) : m_mainHandler(mainHandler),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
ObjectRelayInfo::ObjectRelayInfo(MainHandler *mainHandler)
: m_mainHandler(mainHandler)
, m_logger(getLogger("ObjectRelayInfo"))
{
}
//------------------------------------------------------------------------------
@@ -10,7 +10,7 @@
#include "dds_handler.h"
#include "logger.h"
#include <Core/core_types.h>
#include <DDS/Core/function_reply_object.h>
// Generated
#include <AssetManagement/asm_db.h>
@@ -47,11 +47,12 @@ public:
static RelayInfo toDdsData(const Database::AsmEgcuRelayInfo &dbData); // db -> dds
protected:
NGL::INGLLogger &m_logger;
void onPublishData();
private:
MainHandler *m_mainHandler;
RelayInfo m_data;
NGL::INGLLogger &m_logger;
};
}
@@ -14,8 +14,10 @@
//------------------------------------------------------------------------------
namespace AssetManagement
{
ObjectTrainingArea::ObjectTrainingArea(MainHandler *mainHandler) : m_mainHandler(mainHandler),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
ObjectTrainingArea::ObjectTrainingArea(MainHandler *mainHandler)
: m_mainHandler(mainHandler)
, m_logger(getLogger("ObjectTrainingArea"))
{
}
//------------------------------------------------------------------------------
@@ -7,10 +7,10 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QObject>
#include "dds_handler.h"
#include "logger.h"
#include <Core/core_types.h>
#include <DDS/Core/function_reply_object.h>
// Generated
#include <AssetManagement/asm_db.h>
@@ -46,11 +46,12 @@ public:
static Database::AsmTrainingArea toDbData(const TrainingArea &ddsData); // dds -> db
protected:
NGL::INGLLogger &m_logger;
void onPublishData();
private:
MainHandler *m_mainHandler;
TrainingArea m_data;
NGL::INGLLogger &m_logger;
};
}
@@ -6,8 +6,8 @@
*/
#pragma once
#include <QtCore/QString>
#include <QtCore/QPair>
#include <QString>
#include <QPair>
namespace NGL
{