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 esc_[d|f]tc.h
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV WS svcEscCommon SHARED ${SRCS_common})
NGL_ADD_LIBRARY(AAR SV WS svcEscCommon SHARED ${SRCS_common})
NGL_TARGET_INCLUDE_DIRECTORIES(svcEscCommon
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
IF(BUILD_RTI)
NGL_TARGET_LINK_LIBRARIES(svcEscCommon
PRIVATE
RTI::nddscpp2
@@ -49,7 +48,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEscCommon
ngldb
NGLLogger
)
ENDIF(BUILD_RTI)
NGL_INSTALL_TARGET(svcEscCommon)
#
@@ -61,14 +59,13 @@ SET(SRCS_client
# generate esc_[d|f]tc.h, esc_[d|f]tc_impl.[cpp|h]
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV WS svcEscClient SHARED ${SRCS_client})
NGL_ADD_LIBRARY(AAR SV WS svcEscClient SHARED ${SRCS_client})
NGL_TARGET_INCLUDE_DIRECTORIES(svcEscClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
IF(BUILD_RTI)
NGL_TARGET_LINK_LIBRARIES(svcEscClient
PRIVATE
RTI::nddscpp2
@@ -77,7 +74,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEscClient
svcEscCommon
ddsftc
)
ENDIF(BUILD_RTI)
NGL_INSTALL_TARGET(svcEscClient)
#
@@ -89,14 +85,13 @@ SET(SRCS_server
# generate esc_[d|f]ts.h, esc_[d|f]ts_impl.[cpp|h]
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV svcEscServer SHARED ${SRCS_server})
NGL_ADD_LIBRARY(AAR SV svcEscServer SHARED ${SRCS_server})
NGL_TARGET_INCLUDE_DIRECTORIES(svcEscServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
IF(BUILD_RTI)
NGL_TARGET_LINK_LIBRARIES(svcEscServer
PRIVATE
RTI::nddscpp2
@@ -106,7 +101,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEscServer
PUBLIC
svcEscCommon
)
ENDIF(BUILD_RTI)
NGL_INSTALL_TARGET(svcEscServer)
#
@@ -7,21 +7,23 @@
*/
#include "connection_handler_serial.h"
#include <LtsUtils/LtsUtilsCore/sfm_bytemessage_converter.h>
#include <LtsUtilsCore/sfm_bytemessage_converter.h>
#include <QtCore/QTimer>
#include <QTimer>
namespace EffectShowClient
{
ConnectionHandlerSerial::ConnectionHandlerSerial(QObject *parent) : QObject(parent)
ConnectionHandlerSerial::ConnectionHandlerSerial(QObject *parent)
: QObject(parent)
, m_spQuerry(new LtsSerialPortQuerry::LtsSerialPortQuerry(this))
, m_serialPort(nullptr)
, m_receiveTimeoutTimer(new QTimer(this))
, m_currentDataRead(QByteArray())
, m_portName(QStringLiteral("COM5"))
, m_readBuffer(new QByteArray()),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
, m_readBuffer(new QByteArray())
, m_logger(getLogger("ConnectionHandlerSerial"))
{
m_receiveTimeoutTimer->setInterval(1700);
connect(m_spQuerry, &LtsSerialPortQuerry::LtsSerialPortQuerry::connectionEstablished, this, &ConnectionHandlerSerial::open);
m_spQuerry->restartQuerry();
@@ -11,8 +11,8 @@
#include "logger.h"
#include <LtsSerialPortQuerry/lts_serial_port_querry.h>
#include <QtCore/QObject>
#include <QtCore/QTimer>
#include <QObject>
#include <QTimer>
#include <QSerialPort>
@@ -47,7 +47,6 @@ private slots:
void read();
private:
NGL::INGLLogger &m_logger;
bool isValidCommandByte(const unsigned char command);
bool isValidPayloadByte(const unsigned char payload);
LtsSerialPortQuerry::LtsSerialPortQuerry *m_spQuerry;
@@ -56,6 +55,7 @@ private:
QByteArray m_currentDataRead;
QString m_portName;
QByteArray *m_readBuffer;
NGL::INGLLogger &m_logger;
};
} // namespace EffectShowClient
@@ -8,18 +8,20 @@
#include "connection_handler_tcp.h"
#include "settings.h"
#include <LtsUtils/LtsUtilsCore/sfm_bytemessage_converter.h>
#include <LtsUtilsCore/sfm_bytemessage_converter.h>
#include <QtCore/QTimer>
#include <QTimer>
namespace EffectShowClient
{
ConnectionHandlerTcp::ConnectionHandlerTcp(QObject *parent) : QObject(parent)
ConnectionHandlerTcp::ConnectionHandlerTcp(QObject *parent)
: QObject(parent)
, m_socket(nullptr)
, m_timer(new QTimer(this))
, m_currentDataRead(QByteArray()),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
, m_currentDataRead(QByteArray())
, m_logger(getLogger("ConnectionHandlerTcp"))
{
m_timer->setInterval(5000);
connect(m_timer, &QTimer::timeout, this, &ConnectionHandlerTcp::open);
@@ -8,10 +8,10 @@
#pragma once
#include <QtCore/QObject>
#include <QtNetwork/QTcpSocket>
#include <QObject>
#include <QTcpSocket>
#include <LtsUtils/LtsUtilsCore/sfm_bytemessage_converter.h>
#include <LtsUtilsCore/sfm_bytemessage_converter.h>
#include "logger.h"
@@ -49,11 +49,11 @@ private slots:
private:
NGL::INGLLogger &m_logger;
bool isValidCommandByte(const unsigned char command);
bool isValidPayloadByte(const unsigned char payload);
QTcpSocket *m_socket;
QTimer *m_timer;
QByteArray m_currentDataRead;
NGL::INGLLogger &m_logger;
};
} // namespace EffectShowClient
@@ -12,11 +12,13 @@
namespace EffectShowClient
{
ControlUnitHandler::ControlUnitHandler(QObject *parent) : QObject(parent)
ControlUnitHandler::ControlUnitHandler(QObject *parent)
: QObject(parent)
, m_connectionHandler(new ConnectionHandler(this))
, m_timer(new QTimer(this))
, m_feature(EffectShowManagement::Feature_e::NotSpecified),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
, m_feature(EffectShowManagement::Feature_e::NotSpecified)
, m_logger(getLogger("ControlUnitHandler"))
{
m_timer->setInterval(10000);
connect(m_timer, &QTimer::timeout, this, &ControlUnitHandler::onConnectedToSerialConveter);
m_timer->start();
@@ -11,8 +11,8 @@
#include "logger.h"
#include "handler_vehicle.h"
#include "esc_helper.h"
#include <QtCore/QObject>
#include <QtCore/QTimer>
#include <QObject>
#include <QTimer>
namespace EffectShowClient
{
@@ -59,10 +59,12 @@ private slots:
void onDisconnectedFromSerialConveter();
private:
NGL::INGLLogger &m_logger;
ConnectionHandler *m_connectionHandler;
QTimer *m_timer;
EffectShowManagement::Feature_e m_feature;
NGL::INGLLogger &m_logger;
};
} // namespace EffectShowClient
@@ -15,6 +15,7 @@ namespace EffectShowClient
DdsHandler::DdsHandler(int domainId, int exerciseId)
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Any, exerciseId))
, m_exerciseId(exerciseId)
, m_logger(getLogger("DdsHandler"))
{
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
}
@@ -47,7 +47,6 @@ public:
std::shared_ptr<Core::Interface::Dtc> dtcCore() const { return m_dtcCore;}
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
std::shared_ptr<Core::Pacemaker> m_pacemaker;
std::shared_ptr<Core::Interface::Dtc> m_dtcCore;
@@ -58,6 +57,8 @@ private:
std::shared_ptr<NotificationManagement::Interface::Ftc> m_ftcNom;
std::shared_ptr<AssetManagement::Interface::Dtc> m_dtcAsm;
int m_exerciseId;
NGL::INGLLogger &m_logger;
};
} // namespace EffectShowClient
@@ -8,7 +8,7 @@
*/
#include "esc_convert_from_tab.h"
#include <LtsUtils/qbytearray_byteaccess.h>
#include <LtsUtilsCore/qbytearray_byteaccess.h>
namespace EffectShowClient
@@ -10,7 +10,7 @@
#pragma once
#include <TrainingAreaBase/tab_dtc.h>
#include <EffectShowClient/esc_dts.h>
#include <QtCore/QString>
#include <QString>
namespace EffectShowClient
{
@@ -8,9 +8,9 @@
*/
#include "esc_convert_to_tab.h"
#include <LtsUtils/qbytearray_byteaccess.h>
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
#include <QtCore/QByteArray>
#include <LtsUtilsCore/qbytearray_byteaccess.h>
#include <LtsUtilsCore/dds_vector.h>
#include <QByteArray>
namespace EffectShowClient
@@ -10,7 +10,7 @@
#pragma once
#include <TrainingAreaBase/tab_dtc.h>
#include <EffectShowManagement/esm_dtc.h>
#include <QtCore/QString>
#include <QString>
namespace EffectShowClient
{
@@ -7,7 +7,7 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QObject>
namespace EffectShowClient
{
@@ -13,8 +13,8 @@
#include "handler_order.h"
#include "handler_vehicle.h"
#include "control_unit_handler.h"
#include <QtCore/QTimer>
#include <QtCore/QCoreApplication>
#include <QTimer>
#include <QCoreApplication>
#include <NGLLogger/NGLLoggerBootstrap.h>
namespace EffectShowClient
@@ -25,6 +25,7 @@ HandlerFiringExplosion::HandlerFiringExplosion(MainHandler *mainHandler,
: QObject(parent)
, ManuallyExplosionRequestHandler(mainHandler->dds()->fts())
, m_mainHandler(mainHandler)
, m_logger(getLogger("HandlerFiringExplosion"))
{
}
@@ -7,8 +7,8 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QtCore/QMap>
#include <QObject>
#include <QMap>
#include <EffectShowClient/esc_db.h>
#include "handler_vehicle.h"
#include "dds_handler.h"
@@ -54,17 +54,16 @@ private Q_SLOTS:
void onEffectShowStarted();
private:
NGL::INGLLogger &m_logger;
void onManuallyExplosionRequest(const rti::core::SampleIdentity &cookie,
const ManuallyExplosionRequest &request);
private:
NGL::INGLLogger &m_logger;
MainHandler *m_mainHandler;
EffectShowClient::FiringExplosionEntity m_firingExplosionEntity;
bool m_isInterrupted = false;
bool m_isNew = true;
SafetyConfirmation_e m_lastState;
NGL::INGLLogger &m_logger;
};
}
@@ -14,8 +14,8 @@
#include "handler_tab_data.h"
#include "handler_order.h"
#include "handler_vehicle.h"
#include <QtCore/QTimer>
#include <QtCore/QCoreApplication>
#include <QTimer>
#include <QCoreApplication>
#include <NGLLogger/NGLLoggerBootstrap.h>
namespace EffectShowClient
@@ -26,6 +26,7 @@ HandlerFiringSmoke::HandlerFiringSmoke(MainHandler *mainHandler,
: QObject(parent)
, ManuallySmokeRequestHandler(mainHandler->dds()->fts())
, m_mainHandler(mainHandler)
, m_logger(getLogger("HandlerFiringSmoke"))
{
DEBUG_LOG(m_logger) << "HandlerFiringSmoke ctor";
}
@@ -7,8 +7,8 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QtCore/QMap>
#include <QObject>
#include <QMap>
#include <EffectShowClient/esc_db.h>
#include "handler_vehicle.h"
@@ -46,14 +46,13 @@ private Q_SLOTS:
void onStatusSmokeFiring(const StatusSmokeFiring_t &statusSmokeFiring);
private:
NGL::INGLLogger &m_logger;
void onManuallySmokeRequest(const rti::core::SampleIdentity &cookie,
const ManuallySmokeRequest &request);
private:
NGL::INGLLogger &m_logger;
MainHandler *m_mainHandler;
EffectShowClient::FiringSmokeEntity m_firingSmokeEntity;
NGL::INGLLogger &m_logger;
};
}
@@ -16,7 +16,7 @@
#include "handler_tab_data.h"
#include <QtCore/QCoreApplication>
#include <QCoreApplication>
#include <NGLLogger/NGLLoggerBootstrap.h>
@@ -33,6 +33,7 @@ HandlerOperatingCondition::HandlerOperatingCondition(MainHandler *mainHandler,
, m_isOperational(false)
, m_oldErrorState(false)
, m_operationalStatusTimer(new QTimer)
, m_logger(getLogger("HandlerOperatingCondition"))
{}
//=============================================================================
HandlerOperatingCondition::~HandlerOperatingCondition()
@@ -7,8 +7,8 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QtCore/QMap>
#include <QObject>
#include <QMap>
#include "handler_vehicle.h"
#include "dds_handler.h"
#include "control_unit_handler.h"
@@ -53,7 +53,6 @@ private slots:
private:
NGL::INGLLogger &m_logger;
void onSendAmmunitionRequest(const rti::core::SampleIdentity &cookie,
const SendAmmunitionRequest &request);
void onSendSafetyRevokeRequest(const rti::core::SampleIdentity &cookie,
@@ -64,7 +63,6 @@ private:
bool isErrorDmf();
private:
NGL::INGLLogger &m_logger;
MainHandler *m_mainHandler{nullptr};
CardRidges m_readyCardridges;
CardRidges m_smokingCardridges;
@@ -72,6 +70,9 @@ private:
bool m_oldErrorState;
QTimer *m_operationalStatusTimer{nullptr};
NGL::INGLLogger &m_logger;
EffectShowClient::OperatingConditionEntity m_operatingCondition;
};
}
@@ -16,7 +16,7 @@
#include "handler_tab_data.h"
#include "handler_vehicle.h"
#include <QtCore/QCoreApplication>
#include <QCoreApplication>
#include <NGLLogger/NGLLoggerBootstrap.h>
namespace EffectShowClient
@@ -27,6 +27,7 @@ HandlerOrder::HandlerOrder(MainHandler *mainHandler,
: QObject(parent)
, OrderModifyRequestHandler(mainHandler->dds()->fts())
, m_mainHandler(mainHandler)
, m_logger(getLogger("HandlerOrder"))
{}
//=============================================================================
HandlerOrder::~HandlerOrder()
@@ -144,7 +145,7 @@ void HandlerOrder::removeOrder(const ConvertFromTab::OrderRetract_t &orderRetrac
int def = it.value()->getData().orderConfirmation;
ret = it.value()->removeObject();
if (ret.error())
ERROR_LOG(m_logger) << Q_FUNC_INFO << ret();
ERROR_LOG(m_logger) << LOGFUNCTION << ret();
else
{
if (def == EffectShowManagement::OrderConfirmation_e_def::Execution ||
@@ -7,8 +7,8 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QtCore/QMap>
#include <QObject>
#include <QMap>
#include <EffectShowClient/esc_db.h>
#include "dds_handler.h"
#include "esc_convert_from_tab.h"
@@ -47,13 +47,13 @@ Q_SIGNALS:
void effectShowInterrupted();
private:
NGL::INGLLogger &m_logger;
void onOrderModifyRequest(const rti::core::SampleIdentity &cookie,
const OrderModifyRequest &request) override final;
private:
NGL::INGLLogger &m_logger;
QMap<int, ObjectOrder *> m_orderObjMap;
MainHandler *m_mainHandler;
NGL::INGLLogger &m_logger;
};
}
@@ -5,7 +5,7 @@
* $Author$
* Created by hjl, SLSE, 2017-02-20
*/
#include <QtCore/QVector>
#include <QVector>
#include "main_handler.h"
#include "handler_tab_data.h"
#include "handler_order.h"
@@ -22,6 +22,7 @@ HandlerTabData::HandlerTabData(MainHandler *mainHandler,
: QObject(parent)
, m_mainHandler(mainHandler)
, m_logger(getLogger("HandlerTabData"))
{
} // end of ctor()
//=============================================================================
@@ -52,7 +52,6 @@ public:
void vehicleStatus(const ConvertToTab::VehicleStatus_t &vehicleStatus);
protected:
NGL::INGLLogger &m_logger;
void onSendFireSmokeMarkerDataReply(const Core::FunctionReplyObject &reply) override final;
Q_SIGNALS:
@@ -64,6 +63,8 @@ private Q_SLOTS:
private: // attributes
MainHandler *m_mainHandler;
NGL::INGLLogger &m_logger;
};
} // namespace EffectShowClient
@@ -11,19 +11,22 @@
#include "esc_helper.h"
#include "control_unit_handler.h"
#include <QtCore/QCoreApplication>
#include <QCoreApplication>
#include <NGLLogger/NGLLoggerBootstrap.h>
#include <QtCore/QTimer>
#include <QTimer>
namespace EffectShowClient
{
//=============================================================================
HandlerVehicle::HandlerVehicle(MainHandler *mainHandler,
QObject *parent) : QObject(parent)
QObject *parent)
: QObject(parent)
, m_mainHandler(mainHandler)
, m_volleyTimer(new QTimer(this))
, m_remainingTimer(new QTimer(this)),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
, m_remainingTimer(new QTimer(this))
, m_logger(getLogger("HandlerVehicle"))
{
DEBUG_LOG(m_logger) << "HandlerVehicle ctor";
m_volleyTimer->setSingleShot(true);
m_remainingTimer->setInterval(1000);
@@ -12,9 +12,9 @@
#include "esc_convert_to_tab.h"
#include "logger.h"
#include "esc_helper.h"
#include <QtCore/QObject>
#include <QtCore/QTimer>
#include <QtCore/QMap>
#include <QObject>
#include <QTimer>
#include <QMap>
namespace EffectShowClient
{
@@ -85,7 +85,6 @@ public:
void effectShowControl(EffectShowClient::EffectShowControl_e effectShowControl);
private:
NGL::INGLLogger &m_logger;
void spreadShotsInVolleys(int shots, int volleys);
signals:
@@ -126,6 +125,8 @@ private: // attributes
StatusSmokeFiring_t m_statusSmokeFiring;
QMap<int, int> m_shotsInVolley;
QMap<int, double> m_pauseAfterVolley;
NGL::INGLLogger &m_logger;
};
} // namespace EffectShowClient
@@ -9,7 +9,7 @@
#pragma once
#include <NGLLogger/INGLLogger.h>
#include "svcesccommon_export.h"
#include "esc_export.h"
namespace EffectShowClient
{
@@ -19,7 +19,8 @@
namespace EffectShowClient
{
MainHandler::MainHandler(QObject *parent) : QObject(parent)
MainHandler::MainHandler(QObject *parent)
: QObject(parent)
, m_ddsHandler(nullptr)
, m_dbHandler(nullptr)
, m_handlerOrder(nullptr)
@@ -28,8 +29,9 @@ MainHandler::MainHandler(QObject *parent) : QObject(parent)
, m_handlerFiringSmoke(nullptr)
, m_handlerTabData(nullptr)
, m_handlerVehicle(nullptr)
, m_handlerControlUnit(nullptr),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
, m_handlerControlUnit(nullptr)
, m_logger(getLogger("MainHandler"))
{}
MainHandler::~MainHandler()
{
@@ -6,7 +6,7 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QObject>
#include <memory>
#include "dds_handler.h"
#include <ngldb/db_service_handler.h>
@@ -48,7 +48,6 @@ public:
std::shared_ptr<ControlUnitHandler> handlerControlUnit() const { return m_handlerControlUnit; }
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<DdsHandler> m_ddsHandler;
std::shared_ptr<DbHandler> m_dbHandler;
@@ -59,5 +58,8 @@ private:
std::shared_ptr<HandlerTabData> m_handlerTabData;
std::shared_ptr<HandlerVehicle> m_handlerVehicle;
std::shared_ptr<ControlUnitHandler> m_handlerControlUnit;
NGL::INGLLogger &m_logger;
};
} // namespace EffectShowClient
@@ -19,6 +19,7 @@ namespace EffectShowClient
ObjectOrder::ObjectOrder(MainHandler *mainHandler, QObject *parent)
: QObject(parent)
, m_mainHandler(mainHandler)
, m_logger(getLogger("ObjectOrder"))
{
}
@@ -8,10 +8,10 @@
#include "dds_handler.h"
#include "logger.h"
#include <QtCore/QObject>
#include <QObject>
#include <NotificationManagement/nom_ftc.h>
#include <Core/core_types.h>
#include <DDS/Core/function_reply_object.h>
// Generated
#include <EffectShowClient/esc_db.h>
@@ -40,7 +40,6 @@ class ObjectOrder
Core::FunctionReplyObject updateObject() { return updateObject(m_data); }
protected:
NGL::INGLLogger &m_logger;
// Callbackfunctions for FTC
void onCreateNotificationReply(const Core::FunctionReplyObject &replyObject) override final;
@@ -53,5 +52,7 @@ class ObjectOrder
MainHandler *m_mainHandler;
Database::EscOrder m_data;
NGL::INGLLogger &m_logger;
};
} // namespace EffectShowClient
@@ -6,7 +6,7 @@
*/
#pragma once
#include <QtCore/QString>
#include <QString>
namespace NGL
{