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:
1 parent
c143ff8a4f
commit
d5af8b9764
1244 files changed
+4266
-4633
No files matched your search
@@ -45,13 +45,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# Generate osc_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE} PARTS FTC)
|
||||
|
||||
NGL_ADD_LIBRARY2(SV WS svcOscCommon SHARED ${SRCS_common})
|
||||
NGL_ADD_LIBRARY(SV WS svcOscCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcOscCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcOscCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -61,7 +60,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOscCommon
|
||||
NGLLogger
|
||||
ngldb
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcOscCommon)
|
||||
|
||||
#
|
||||
@@ -73,14 +71,13 @@ SET(SRCS_client
|
||||
# generate osc_[d|f]tc.h, osc_[d|f]tc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE} PARTS FTC)
|
||||
|
||||
NGL_ADD_LIBRARY2(SV WS svcOscClient SHARED ${SRCS_client})
|
||||
NGL_ADD_LIBRARY(SV WS svcOscClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcOscClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcOscClient
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -89,7 +86,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOscClient
|
||||
svcOscCommon
|
||||
ddsftc
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcOscClient)
|
||||
|
||||
#
|
||||
@@ -101,14 +97,13 @@ SET(SRCS_server
|
||||
# generate osc_[d|f]ts.h, osc_[d|f]ts_impl.[cpp|h]
|
||||
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE} PARTS FTS)
|
||||
|
||||
NGL_ADD_LIBRARY2(SV svcOscServer SHARED ${SRCS_server})
|
||||
NGL_ADD_LIBRARY(SV svcOscServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcOscServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcOscServer
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -118,7 +113,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOscServer
|
||||
svcOscCommon
|
||||
ngldb
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcOscServer)
|
||||
|
||||
#
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QVector>
|
||||
#include <QVector>
|
||||
|
||||
#include <DDS/Core/core.hpp>
|
||||
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@
|
||||
|
||||
#include <DDS/Core/core.hpp>
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QMap>
|
||||
#include <QString>
|
||||
#include <QMap>
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QJsonObject>
|
||||
|
||||
+4
-4
@@ -11,10 +11,10 @@
|
||||
|
||||
#include "main_handler.h"
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QVector>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QMap>
|
||||
#include <QVector>
|
||||
|
||||
namespace OcSituationClient
|
||||
{
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q
|
||||
, m_messageFactory(nullptr)
|
||||
, m_dataManager(nullptr)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("WebSocketInterfaceHandler"))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
#include <LtsWebSocket/lts_web_socket_client.h>
|
||||
|
||||
|
||||
+5
-3
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "central_aes_byte_reader.h"
|
||||
|
||||
#include <LtsUtils/qbytearray_byteaccess.h>
|
||||
#include <LtsUtilsCore/qbytearray_byteaccess.h>
|
||||
|
||||
#include "main_handler.h"
|
||||
#include "settings.h"
|
||||
@@ -16,8 +16,10 @@
|
||||
namespace OcSituationClient
|
||||
{
|
||||
|
||||
CentralAesByteReader::CentralAesByteReader(const QByteArray &data) : m_data(data),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
CentralAesByteReader::CentralAesByteReader(const QByteArray &data)
|
||||
: m_data(data)
|
||||
, m_logger(getLogger("CentralAesByteReader"))
|
||||
{}
|
||||
|
||||
bool CentralAesByteReader::getRemoveMessage(size_t &pos, CentralAesByteReader::RemoveMessage &removeMessage) const
|
||||
{
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QByteArray>
|
||||
#include "AreaEffectSimulation/aes_dtc.h"
|
||||
#include "OcSituationServer/oc_situation.h"
|
||||
#include "logger.h"
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace OcSituationClient
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -40,13 +40,14 @@ public:
|
||||
qint64 currentPartitionTime() const;
|
||||
|
||||
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<Core::Interface::Dtc> m_dtcCore;
|
||||
std::shared_ptr<OcSituationClient::Interface::Fts> m_ddsFts;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace OcSituationClient
|
||||
+3
-3
@@ -7,9 +7,8 @@
|
||||
*/
|
||||
|
||||
#include "handler_oc_aes_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <LtsUtils/qbytearray_byteaccess.h>
|
||||
#include <LtsUtilsCore/qbytearray_byteaccess.h>
|
||||
|
||||
#include <OcSituationServer/oc_situation.h>
|
||||
|
||||
@@ -28,6 +27,7 @@ HandlerOcAesData::HandlerOcAesData(MainHandler *mainHandler,
|
||||
, m_tabDts(mainHandler->tabDts())
|
||||
, m_tabocDtc(mainHandler->tabocDtc())
|
||||
, m_utmCoord(LtsCoordTrans::UtmCoordinate::fromMgrs(Settings::baseCoord()))
|
||||
, m_logger(getLogger("HandlerOcAesData"))
|
||||
{}
|
||||
|
||||
HandlerOcAesData::~HandlerOcAesData()
|
||||
@@ -177,7 +177,7 @@ void HandlerOcAesData::handleDangerAreas(const QByteArray &data, size_t pos)
|
||||
m_aesFtc->dangerAreaModifyRequest(req, this);
|
||||
}
|
||||
|
||||
for (int id : std::as_const(aesToBeDeleted))
|
||||
for (int id : qAsConst(aesToBeDeleted))
|
||||
{
|
||||
if (m_aesDtc->dangerArea(id).isCentral())
|
||||
continue;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QObject>
|
||||
#include <QPointF>
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
|
||||
+5
-5
@@ -8,11 +8,11 @@
|
||||
|
||||
#include "handler_oc_central_aes_data.h"
|
||||
|
||||
#include <QtCore/QLineF>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QLineF>
|
||||
#include <QPointF>
|
||||
#include <QTimer>
|
||||
#include <Common/LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <LtsUtils/qbytearray_byteaccess.h>
|
||||
#include <LtsUtilsCore/qbytearray_byteaccess.h>
|
||||
|
||||
#include "central_aes_byte_reader.h"
|
||||
#include "main_handler.h"
|
||||
@@ -25,7 +25,7 @@ HandlerOcCentralAesData::HandlerOcCentralAesData(const std::shared_ptr<AreaEffec
|
||||
const std::shared_ptr<AreaEffectSimulation::Interface::Ftc> &aesFtc,
|
||||
const std::shared_ptr<TrainingAreaBaseOC::Interface::Dts> &tabocDts,
|
||||
QObject *parent)
|
||||
: QObject(parent), m_aesDtc(aesDtc), m_aesFtc(aesFtc), m_tabocDts(tabocDts)
|
||||
: QObject(parent), m_aesDtc(aesDtc), m_aesFtc(aesFtc), m_tabocDts(tabocDts), m_logger(getLogger("HandlerOcCentralAesData"))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QSet>
|
||||
#include <QObject>
|
||||
#include <QHash>
|
||||
#include <QSet>
|
||||
|
||||
#include <OcSituationServer/oc_situation.h>
|
||||
#include <AreaEffectSimulation/aes_ftc.h>
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
*/
|
||||
|
||||
#include "handler_oc_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtils/qbytearray_byteaccess.h>
|
||||
#include <LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtilsCore/qbytearray_byteaccess.h>
|
||||
|
||||
#include "main_handler.h"
|
||||
#include "handler_oc_aes_data.h"
|
||||
@@ -54,6 +53,7 @@ HandlerOcData::HandlerOcData(MainHandler *mainHandler,
|
||||
, m_useFilter(false)
|
||||
, m_position(dds::core::optional<Core::GeoPosition2D>())
|
||||
, m_licensed(false)
|
||||
, m_logger(getLogger("HandlerOcData"))
|
||||
{}
|
||||
|
||||
HandlerOcData::~HandlerOcData()
|
||||
@@ -74,7 +74,7 @@ bool HandlerOcData::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const auto &data : std::as_const(dataVec))
|
||||
for (const auto &data : qAsConst(dataVec))
|
||||
{
|
||||
switch (data.aesTypeId)
|
||||
{
|
||||
@@ -399,7 +399,7 @@ void HandlerOcData::situationRequestCycleTimeout()
|
||||
|
||||
void HandlerOcData::onUserChanged(const OperatorManagement::User &data, DataModification modType)
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION;
|
||||
|
||||
if (modType != DataModification::eModified || data.id() == 99) // id 99 = Organisator
|
||||
return;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QMap>
|
||||
#include <QTimer>
|
||||
|
||||
#include <OcSituationServer/oc_situation.h>
|
||||
|
||||
@@ -43,7 +43,6 @@ public:
|
||||
bool init();
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onEvlSchemaModifyReply(const Core::FunctionReplyObject &reply) override final;
|
||||
void onCreateOperatorMessageReply(const Core::FunctionReplyObject &reply) override final;
|
||||
void onModifyOperatorMessageReply(const Core::FunctionReplyObject &reply) override final;
|
||||
@@ -121,5 +120,8 @@ private:
|
||||
OperatorManagement::User m_user;
|
||||
|
||||
bool m_licensed;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
} // namespace OcSituationClient
|
||||
+5
-5
@@ -7,10 +7,9 @@
|
||||
*/
|
||||
|
||||
#include "handler_oc_situation_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <LtsUtils/qbytearray_byteaccess.h>
|
||||
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtilsCore/qbytearray_byteaccess.h>
|
||||
#include <LtsUtilsCore/dds_vector.h>
|
||||
|
||||
#include "main_handler.h"
|
||||
#include "settings.h"
|
||||
@@ -32,6 +31,7 @@ HandlerOcSituationData::HandlerOcSituationData(const std::shared_ptr<DdsHandler>
|
||||
, m_tabDts(tabDts)
|
||||
, m_tabocDtc(tabocDtc)
|
||||
, m_tabocDts(tabocDts)
|
||||
, m_logger(getLogger("HandlerOcSituationData"))
|
||||
{}
|
||||
|
||||
HandlerOcSituationData::~HandlerOcSituationData()
|
||||
@@ -97,7 +97,7 @@ void HandlerOcSituationData::process(const QByteArray &data, bool bIsInitial)
|
||||
|
||||
int ownEquipmentNumber = m_tabocDtc->specificsEquipment(1).equipmentNumber();
|
||||
int ownParticipantId = -1;
|
||||
for (const int &participantId : std::as_const(m_participantId2EqId))
|
||||
for (const int &participantId : qAsConst(m_participantId2EqId))
|
||||
{
|
||||
if (m_participantId2EqId.value(participantId) == ownEquipmentNumber)
|
||||
{
|
||||
@@ -138,7 +138,7 @@ void HandlerOcSituationData::removeAllPositions()
|
||||
invalidPos.position().reportingSource(Core::PositionReportingSource::SetByOperator); // SetByOperator -> nan is allowed
|
||||
invalidPos.sampleTime(m_dds->currentPartitionTime());
|
||||
|
||||
for (const auto eqNumber : std::as_const(m_participantId2EqId))
|
||||
for (const auto eqNumber : qAsConst(m_participantId2EqId))
|
||||
{
|
||||
invalidPos.equipmentNumber(eqNumber);
|
||||
m_tabDts->publish(invalidPos);
|
||||
|
||||
+2
-2
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QHash>
|
||||
#include <QHash>
|
||||
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ParticipantManagement/ppm_ftc.h>
|
||||
#include <OcSituationServer/oc_situation.h>
|
||||
#include <TrainingAreaBase/tab_dts.h>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "svcosccommon_export.h"
|
||||
#include "osc_export.h"
|
||||
|
||||
namespace OcSituationClient
|
||||
{
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
namespace OcSituationClient
|
||||
{
|
||||
|
||||
MainHandler::MainHandler(QObject *parent) : QObject(parent)
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_handlerOcData(nullptr)
|
||||
, m_dbHandler(nullptr)
|
||||
@@ -34,8 +35,9 @@ MainHandler::MainHandler(QObject *parent) : QObject(parent)
|
||||
, m_tabDtc(nullptr)
|
||||
, m_tabFtc(nullptr)
|
||||
, m_tabocDtc(nullptr)
|
||||
, m_tabocDts(nullptr),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_tabocDts(nullptr)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include <memory>
|
||||
|
||||
#include <AreaEffectSimulation/aes_dtc.h>
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <OcSituationServer/oss_dts.h>
|
||||
#include <OcSituationServer/oss_fts.h>
|
||||
#include <OperatorManagement/opm_dtc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ParticipantManagement/ppm_ftc.h>
|
||||
#include <TrainingAreaBase/tab_dtc.h>
|
||||
#include <TrainingAreaBase/tab_dts.h>
|
||||
@@ -84,7 +84,6 @@ public:
|
||||
return {};
|
||||
}
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<HandlerOcData> m_handlerOcData;
|
||||
std::shared_ptr<DbHandler> m_dbHandler;
|
||||
@@ -105,5 +104,7 @@ private:
|
||||
std::shared_ptr<TrainingAreaBase::Interface::Ftc> m_tabFtc;
|
||||
std::shared_ptr<TrainingAreaBaseOC::Interface::Dtc> m_tabocDtc;
|
||||
std::shared_ptr<TrainingAreaBaseOC::Interface::Dts> m_tabocDts;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace OcSituationClient
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user