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 mdm_[d|f]tc.h
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV WS HLA svcMdmCommon SHARED ${SRCS_common})
NGL_ADD_LIBRARY(AAR SV WS HLA svcMdmCommon SHARED ${SRCS_common})
NGL_TARGET_INCLUDE_DIRECTORIES(svcMdmCommon
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
IF(BUILD_RTI)
NGL_TARGET_LINK_LIBRARIES(svcMdmCommon
PRIVATE
RTI::nddscpp2
@@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMdmCommon
NGLLogger
ngldb
)
ENDIF(BUILD_RTI)
NGL_INSTALL_TARGET(svcMdmCommon)
#
@@ -60,14 +58,13 @@ SET(SRCS_client
# generate mdm_[d|f]tc_impl.[cpp|h]
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV WS svcMdmClient SHARED ${SRCS_client})
NGL_ADD_LIBRARY(AAR SV WS svcMdmClient SHARED ${SRCS_client})
NGL_TARGET_INCLUDE_DIRECTORIES(svcMdmClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
IF(BUILD_RTI)
NGL_TARGET_LINK_LIBRARIES(svcMdmClient
PRIVATE
RTI::nddscpp2
@@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMdmClient
svcMdmCommon
ddsftc
)
ENDIF(BUILD_RTI)
NGL_INSTALL_TARGET(svcMdmClient)
#
@@ -88,14 +84,13 @@ SET(SRCS_server
# generate mdm_[d|f]ts.h, mdm_[d|f]ts_impl.[cpp|h]
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
NGL_ADD_LIBRARY2(AAR SV svcMdmServer SHARED ${SRCS_server})
NGL_ADD_LIBRARY(AAR SV svcMdmServer SHARED ${SRCS_server})
NGL_TARGET_INCLUDE_DIRECTORIES(svcMdmServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
)
IF(BUILD_RTI)
NGL_TARGET_LINK_LIBRARIES(svcMdmServer
PRIVATE
RTI::nddscpp2
@@ -105,7 +100,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMdmServer
svcMdmCommon
ngldb
)
ENDIF(BUILD_RTI)
NGL_INSTALL_TARGET(svcMdmServer)
#
@@ -12,8 +12,10 @@
namespace MeteoDataManagement
{
DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::AllExercises)),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
DdsHandler::DdsHandler(int domainId)
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::AllExercises))
, m_logger(getLogger("DdsHandler"))
{
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
} // end of ctor()
//-----------------------------------------------------------------------------
@@ -39,12 +39,12 @@ public:
qint64 currentPartitionTime() const;
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
std::shared_ptr<Core::Interface::Dtc> m_dtcCore;
std::shared_ptr<Core::Pacemaker> m_pacemaker;
std::shared_ptr<MeteoDataManagement::Interface::Dts> m_ddsDts;
std::shared_ptr<MeteoDataManagement::Interface::Fts> m_ddsFts;
NGL::INGLLogger &m_logger;
};
}
@@ -16,10 +16,12 @@ using namespace MeteoDataManagement;
HandlerInfrastructureData::HandlerInfrastructureData(const std::shared_ptr<DdsHandler> &ddsHandler,
const std::shared_ptr<HandlerMeteoDataUnits> &handlerMeteoDataUnits,
QObject *parent) : QObject(parent)
QObject *parent)
: QObject(parent)
, m_ddsHandler(ddsHandler)
, m_handlerMeteoDataUnits(handlerMeteoDataUnits),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
, m_handlerMeteoDataUnits(handlerMeteoDataUnits)
, m_logger(getLogger("HandlerInfrastructureData"))
{
} // end of ctor()
//-----------------------------------------------------------------------------
@@ -16,8 +16,8 @@
#include <InfrastructureManagement/ism_dtc_types.h>
#include <DDS/DTC/generic_dtc_impl.h>
#include <QtCore/QObject>
#include <QtCore/QHash>
#include <QObject>
#include <QHash>
namespace MeteoDataManagement
{
@@ -57,8 +57,6 @@ private Q_SLOTS:
void onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &data, DataModification modType = DataModification::eAdded);
private: // attributes
NGL::INGLLogger &m_logger;
std::shared_ptr<DdsHandler> m_ddsHandler; ///< Pointer to MDM DDS handler
std::shared_ptr<HandlerMeteoDataUnits> m_handlerMeteoDataUnits; ///< Pointer to meteo data units handler
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_dtc; ///< Pointer to DTC InfrastructureManagement interface object
@@ -68,7 +66,7 @@ NGL::INGLLogger &m_logger;
QHash<int, int> m_mountingPointAssetsMap; ///< Hold all available structure element ids for meteo data units (key == assetId)
QHash<int, InfrastructureManagement::MainStructureElement> m_mainStructureElements;
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
};
} // namespace MeteoDataManagement
@@ -12,18 +12,20 @@
#include "handler_infrastructure_data.h"
#include "tcpweatherstation.h"
#include "main_handler.h"
#include <QtCore/QJsonDocument>
#include <QtCore/QJsonObject>
#include <QJsonDocument>
#include <QJsonObject>
using namespace MeteoDataManagement;
HandlerMeteoDataUnit::HandlerMeteoDataUnit(MainHandler *mainHandler,
const InfrastructureManagement::InstrumentationAsset &asset,
QObject *parent) : QObject(parent)
QObject *parent)
: QObject(parent)
, m_mainHandler(mainHandler)
, m_asset(asset)
, m_tcpWS(nullptr),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
, m_tcpWS(nullptr)
, m_logger(getLogger("HandlerMeteoDataUnit"))
{
init();
} // end of ctor()
//-----------------------------------------------------------------------------
@@ -32,7 +32,6 @@ public:
~HandlerMeteoDataUnit();
private:
NGL::INGLLogger &m_logger;
bool init();
protected Q_SLOTS:
@@ -54,14 +53,13 @@ protected Q_SLOTS:
private:
NGL::INGLLogger &m_logger;
MainHandler *m_mainHandler; ///< Pointer to MDM DDS handler
InfrastructureManagement::InstrumentationAsset m_asset; ///< meteo unit data asset
TcpWeatherStation *m_tcpWS; ///< Pointer to tcp based meteo data unit
MeteoDataManagement::MeteoData m_lastMeteoData; ///< last received meteo data
MeteoDataManagement::MeteoData m_newMeteoData; ///< new received meteo data
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
};
} // namespace MeteoDataManagement
@@ -14,8 +14,10 @@
namespace MeteoDataManagement
{
HandlerMeteoDataUnits::HandlerMeteoDataUnits(MainHandler *mainHandler) : m_mainHandler(mainHandler),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
HandlerMeteoDataUnits::HandlerMeteoDataUnits(MainHandler *mainHandler)
: m_mainHandler(mainHandler)
, m_logger(getLogger("HandlerMeteoDataUnits"))
{
} // end of ctor()
//-----------------------------------------------------------------------------
@@ -8,7 +8,7 @@
#pragma once
#include <QtCore/QMap>
#include <QMap>
#include "handler_meteo_data_unit.h"
#include "logger.h"
@@ -28,10 +28,9 @@ public:
bool removeMeteoDataUnit(const InfrastructureManagement::InstrumentationAsset &asset);
private:
NGL::INGLLogger &m_logger;
QMap <int, HandlerMeteoDataUnit *> m_handlerMeteoDataUnitsMap; ///< Hold all meteo data unit handler
MainHandler *m_mainHandler; ///< Pointer to DDS handler
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
};
} // namespace MeteoDataManagement
@@ -15,6 +15,7 @@ HandlerStaticMeteoData::HandlerStaticMeteoData(const std::shared_ptr<DdsHandler>
: StaticMeteoDataModifyRequestHandler(ddsHandler->fts())
, m_ddsHandler(ddsHandler)
, m_db(db)
, m_logger(getLogger("HandlerStaticMeteoData"))
{
} // end of ctor()
//-----------------------------------------------------------------------------
@@ -24,8 +24,6 @@ public:
bool init();
private: // methods
NGL::INGLLogger &m_logger;
void onStaticMeteoDataModifyRequest(const rti::core::SampleIdentity &cookie,
const StaticMeteoDataModifyRequest &request) override final;
@@ -46,6 +44,8 @@ private: // attributes
std::shared_ptr<DdsHandler> m_ddsHandler;
std::shared_ptr<DatabaseInterface> m_db;
Database::MdmStaticMeteoData m_dbStaticMeteoData;
NGL::INGLLogger &m_logger;
};
} // namespace MeteoDataManagement
@@ -9,7 +9,7 @@
#pragma once
#include <NGLLogger/INGLLogger.h>
#include "svcmdmcommon_export.h"
#include "mdm_export.h"
namespace MeteoDataManagement
{
@@ -16,13 +16,15 @@
namespace MeteoDataManagement
{
MainHandler::MainHandler() : m_ddsHandler(nullptr)
MainHandler::MainHandler()
: m_ddsHandler(nullptr)
, m_dbHandler(nullptr)
, m_handlerMeteoDataUnits(nullptr)
, m_handlerInfrastructureData(nullptr)
, m_handlerStaticMeteoData(nullptr)
, m_gnaService(nullptr),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
, m_gnaService(nullptr)
, m_logger(getLogger("MainHandler"))
{
} // end of ctor()
//-----------------------------------------------------------------------------
@@ -41,7 +41,6 @@ public:
std::shared_ptr<DatabaseInterface> db() const;
std::shared_ptr<HandlerInfrastructureData> ism() const { return m_handlerInfrastructureData; }
private:
NGL::INGLLogger &m_logger;
QString initInternal(int domainId);
private: // attributes
std::shared_ptr<DdsHandler> m_ddsHandler; ///< Pointer to DDS handler
@@ -51,6 +50,6 @@ private: // attributes
std::shared_ptr<HandlerStaticMeteoData> m_handlerStaticMeteoData; ///< Pointer to static meteo data handler
GuezNasat::Initialization *m_gnaService;
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
};
} // namespace MeteoDataManagement
@@ -6,7 +6,7 @@
*/
#pragma once
#include <QtCore/QString>
#include <QString>
namespace NGL
{
@@ -10,7 +10,7 @@
#pragma once
#include <QtCore/QTimer>
#include <QTimer>
#include "tcpsocket.h"
@@ -48,8 +48,6 @@ protected Q_SLOTS:
void onRequestTimeout();
protected:
NGL::INGLLogger &m_logger;
/**
* pure virtual function from TcpSocket to initialize the especially sensor device
*/
@@ -8,7 +8,7 @@
#include "tcpsocket.h"
#include <QtCore/QTimer>
#include <QTimer>
#include <QHostInfo>
//#include <sys/socket.h> // used for keepalive
//#include <netinet/tcp.h> // used for keepalive
@@ -8,7 +8,7 @@
#pragma once
#include <QtNetwork/QTcpSocket>
#include <QTcpSocket>
#include "logger.h"
namespace MeteoDataManagement
@@ -23,7 +23,6 @@ public:
~TcpSocket();
protected:
NGL::INGLLogger &m_logger;
/**
* Connect to converter
* @param[in] hostName Hostname or Ip address of the RS232-LAN Converter
@@ -48,7 +47,6 @@ protected Q_SLOTS:
bool sendCommand(const QByteArray &qba);
protected:
NGL::INGLLogger &m_logger;
/**
* pure virtual function to initialize the especially sensor device
*/
@@ -66,6 +64,7 @@ protected:
QTcpSocket *m_socket; ///< pointer to tcpsocket object
bool m_tryReconnect; ///< if true, try reconnection
bool m_bSocketErrorWarnedOnce;
NGL::INGLLogger &m_logger;
};
} // namespace MeteoDataManagement
@@ -18,7 +18,8 @@ TcpWeatherStation::TcpWeatherStation(int id,
const QString &converterIp,
quint16 climatePort,
quint16 windPort,
QObject *parent) : QObject(parent)
QObject *parent)
: QObject(parent)
, m_id(id)
, m_converterIp(converterIp)
, m_climatePort(climatePort)
@@ -31,8 +32,9 @@ TcpWeatherStation::TcpWeatherStation(int id,
, m_direction(0.0)
, m_speed(0.0)
, m_climateOk(false)
, m_windOk(false),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
, m_windOk(false)
, m_logger(getLogger("TcpWeatherStation"))
{
INFO_LOG(m_logger) << "Start TcpWeatherStation ip/(hostname): " << m_converterIp
<< " climatePort: " << m_climatePort
<< " windPort: " << m_windPort;
@@ -8,7 +8,7 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QObject>
#include "logger.h"
namespace MeteoDataManagement
@@ -70,7 +70,6 @@ protected Q_SLOTS:
protected:
NGL::INGLLogger &m_logger;
int m_id; ///< weatherstation id
QString m_converterIp; ///< IP address of the RS232-LAN Converter
quint16 m_climatePort; ///< Access port number of climate sensor on the RS232-LAN Converter
@@ -86,5 +85,6 @@ protected:
float m_speed; ///< last speed value from wind sensor
bool m_climateOk; ///< last statecheck climate
bool m_windOk; ///< last statecheck weather
NGL::INGLLogger &m_logger;
};
} // namespace MeteoDataManagement
@@ -11,7 +11,7 @@
#pragma once
#include <QtCore/QTimer>
#include <QTimer>
#include "tcpsocket.h"