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
@@ -15,9 +15,6 @@ SET(SRCS_common
|
||||
alm_export.h
|
||||
logger.cpp
|
||||
logger.h
|
||||
alm_translation.h
|
||||
alm_translation.cpp
|
||||
alm_types.h
|
||||
)
|
||||
|
||||
# Generate alm_enums.idl / alm.idl
|
||||
@@ -34,13 +31,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# Generate alm_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcAlmCommon SHARED ${SRCS_common})
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcAlmCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAlmCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAlmCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -51,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAlmCommon
|
||||
svcPdmCommon
|
||||
ngldb
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcAlmCommon)
|
||||
|
||||
#
|
||||
@@ -63,14 +58,13 @@ SET(SRCS_client
|
||||
# generate alm_[d|f]tc.h, tlm_[d|f]tc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcAlmClient SHARED ${SRCS_client})
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcAlmClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAlmClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAlmClient
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -80,7 +74,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAlmClient
|
||||
ddsftc
|
||||
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcAlmClient)
|
||||
|
||||
#
|
||||
@@ -108,14 +101,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
# Generate alm.sql, alm.xml
|
||||
CODEGEN_SQL(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV svcAlmServer SHARED ${SRCS_server})
|
||||
NGL_ADD_LIBRARY(AAR SV svcAlmServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAlmServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAlmServer
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -141,7 +133,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAlmServer
|
||||
svcAlmCommon
|
||||
ngldb
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcAlmServer)
|
||||
|
||||
#
|
||||
|
||||
+5
-4
@@ -9,10 +9,10 @@
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCommandLineParser/LtsCommandLineParser.h>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
|
||||
/* ----------------------------------------------------------------------------------
|
||||
* HOW TO RUN THE TESTS
|
||||
@@ -34,6 +34,7 @@ AlmTests::AlmTests(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_testId(0)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_logger(getLogger("AlmTests"))
|
||||
, m_participantIndex(0)
|
||||
{}
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ protected Q_SLOTS:
|
||||
void ExitSuccess();
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onConfigureAlarmsReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
|
||||
private:
|
||||
@@ -61,6 +60,8 @@ private:
|
||||
int m_testId;
|
||||
bool m_bTestsSuccessful;
|
||||
int m_operatorId;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_participantIndex;
|
||||
|
||||
};
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace AlarmManagement
|
||||
|
||||
DdsHandler::DdsHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
|
||||
: m_ddsConnector(ddsConnector)
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <AlarmManagement/alm_dts_types.h>
|
||||
#include <ExerciseEventManagement/eem_dtc.h>
|
||||
#include <MarkerManagement/mrk_ftc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <TrainingAreaBase/tab_dtc.h>
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
#include "logger.h"
|
||||
@@ -49,7 +49,6 @@ 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::TopicLockMaster> m_topicLockMaster;
|
||||
@@ -64,6 +63,10 @@ private:
|
||||
std::shared_ptr<TrainingAreaBase::Interface::Dtc> m_dtcTab;
|
||||
std::shared_ptr<DDSConnector::Publisher> m_dtsEmergencyCallPublisher;
|
||||
std::shared_ptr<DTS::AcknowledgeSOSInAllExercises> m_dtsEmergencyCall;
|
||||
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+7
-7
@@ -7,12 +7,11 @@
|
||||
*/
|
||||
|
||||
#include "handler_configure_alarms.h"
|
||||
#include <utility>
|
||||
#include "initialization.h"
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QSet>
|
||||
#include <QTimer>
|
||||
#include <ProjectDataManagement/pdm_translation.h>
|
||||
#include <LtsUtilsCore/json_object.h>
|
||||
|
||||
@@ -39,6 +38,7 @@ HandlerConfigureAlarms::HandlerConfigureAlarms(Initialization *mainHandler)
|
||||
: QObject()
|
||||
, ConfigureAlarmsRequestHandler(mainHandler->dds()->ftsAlm())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerConfigureAlarms"))
|
||||
, m_windowIndex(0)
|
||||
{
|
||||
} // end of ctor()
|
||||
@@ -245,7 +245,7 @@ void HandlerConfigureAlarms::onEventChanged(const ExerciseEventManagement::Event
|
||||
// Schleife ueber jeden Participant in der Konfiguration
|
||||
// Vergleich Participant-ID Event mit Konfiguration Event
|
||||
// Wenn ja, Alarm an operatorId schicken
|
||||
for (const Database::AlmConfig &alarm : std::as_const(m_alarms))
|
||||
for (const Database::AlmConfig &alarm : qAsConst(m_alarms))
|
||||
{
|
||||
{
|
||||
/*DEBUG_LOG(m_logger) << " alarmConfigItem.id=" << alarm.id
|
||||
@@ -267,7 +267,7 @@ void HandlerConfigureAlarms::onEventChanged(const ExerciseEventManagement::Event
|
||||
else
|
||||
participants.append(0);
|
||||
|
||||
for (int participantId : std::as_const(participants))
|
||||
for (int participantId : qAsConst(participants))
|
||||
{
|
||||
bool allVulnerabilityStates = alarm.vulnerabilityState == -1;
|
||||
bool vulnerabilityCheck = vulnerabilityState == alarm.vulnerabilityState;
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
#include <alm_db.h>
|
||||
@@ -48,8 +48,6 @@ private Q_SLOTS:
|
||||
void onEventChanged(const ExerciseEventManagement::Event &eventData, DataModification modType);
|
||||
|
||||
private: // methods
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onConfigureAlarmsRequest(const rti::core::SampleIdentity &cookie,
|
||||
const ConfigureAlarmsRequest &request) override;
|
||||
void sendWindow(const ExerciseEventManagement::Event &eventData,
|
||||
@@ -86,6 +84,8 @@ private: // attributes
|
||||
}
|
||||
};
|
||||
QMap<int, Database::AlmConfig> m_alarms; // Key = almConfig.id
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_windowIndex;
|
||||
};
|
||||
} // namespace AlarmManagement
|
||||
+6
-6
@@ -7,16 +7,15 @@
|
||||
*/
|
||||
|
||||
#include "handler_emergency_call.h"
|
||||
#include <utility>
|
||||
#include "initialization.h"
|
||||
#include "handler_configure_alarms.h"
|
||||
#include "object_emergency_call.h"
|
||||
#include "alm_db.h"
|
||||
#include <DDS/DTS/generic_dts.h>
|
||||
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QDebug>
|
||||
namespace AlarmManagement
|
||||
{
|
||||
HandlerEmergencyCall::HandlerEmergencyCall(const std::shared_ptr<HandlerConfigureAlarms> &configAlarmHandler,
|
||||
@@ -25,6 +24,7 @@ HandlerEmergencyCall::HandlerEmergencyCall(const std::shared_ptr<HandlerConfigur
|
||||
, EmergencyCallAcknowledgeRequestHandler(mainHandler->dds()->ftsAlm())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_configAlarmHandler(configAlarmHandler)
|
||||
, m_logger(getLogger("HandlerEmergencyCall"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ void HandlerEmergencyCall::onEmergencyCallAcknowledgeRequest(const rti::core::Sa
|
||||
Core::FunctionReplyObject HandlerEmergencyCall::emergencyCallAcknowledgeRequest(const EmergencyCallAcknowledgeRequest &request)
|
||||
{
|
||||
ObjectEmergencyCall *ifs = nullptr;
|
||||
for(auto _ifs : std::as_const(m_emergencyObjMap))
|
||||
for(auto _ifs : qAsConst(m_emergencyObjMap))
|
||||
{
|
||||
auto data = _ifs->getData();
|
||||
if (data.issi == request.issi()
|
||||
@@ -182,7 +182,7 @@ bool HandlerEmergencyCall::isExerciseValidForEmergencyCall() const
|
||||
|
||||
bool HandlerEmergencyCall::isNewEmergencyCall(const AlmEmergencyCall &newdata)
|
||||
{
|
||||
for(const auto &ifs : std::as_const(m_emergencyObjMap))
|
||||
for(const auto &ifs : qAsConst(m_emergencyObjMap))
|
||||
{
|
||||
const auto &data = ifs->getData();
|
||||
if (data.issi == newdata.issi()
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include <AlarmManagement/alm_db.h>
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
@@ -33,7 +33,6 @@ public:
|
||||
bool init();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool createEmergencyCallObject(const AlmEmergencyCall &data);
|
||||
void onEmergencyCallAcknowledgeRequest(const rti::core::SampleIdentity &cookie,
|
||||
const EmergencyCallAcknowledgeRequest &request) override final;
|
||||
@@ -46,9 +45,10 @@ private slots:
|
||||
void onAcknowledgeSOSInExercises(const AlarmManagement::AcknowledgeSOSInAllExercises &data, DataModification modType);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
Initialization *m_mainHandler;
|
||||
std::shared_ptr<HandlerConfigureAlarms> m_configAlarmHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
QMap<int, ObjectEmergencyCall *> m_emergencyObjMap; // Key = DangerAreaId
|
||||
};
|
||||
|
||||
|
||||
@@ -11,9 +11,11 @@
|
||||
|
||||
using namespace AlarmManagement;
|
||||
|
||||
HandlerParticipant::HandlerParticipant(const std::shared_ptr<DdsHandler> &ddsHandler) : QObject()
|
||||
, m_ddsHandler(ddsHandler),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
HandlerParticipant::HandlerParticipant(const std::shared_ptr<DdsHandler> &ddsHandler)
|
||||
: QObject()
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_logger(getLogger("HandlerParticipant"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QList>
|
||||
@@ -78,8 +78,6 @@ private Q_SLOTS:
|
||||
void onDynamicParticipantChanged(const ParticipantManagement::DynamicParticipantData &data, DataModification modType);
|
||||
|
||||
private: // methoden
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVector<AlarmManagement::HandlerParticipant::ParticipantHierarchy> getInferiorParts(int participantId) const;
|
||||
|
||||
private: // attributes
|
||||
@@ -87,7 +85,7 @@ private: // attributes
|
||||
QMap<int, int> m_partId2VulnerabilityMap; ///< Reference map participant (player) to Vulnerability
|
||||
QHash<int, ParticipantHierarchy> m_participantHierarchy;
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler; ///< Pointer to VOM DDS handler
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
};
|
||||
} // namespace AlarmManagement
|
||||
|
||||
@@ -45,15 +45,13 @@ public:
|
||||
std::shared_ptr<HandlerParticipant> hdlParticipant() const { return m_handlerParticipant; }
|
||||
|
||||
private: // attributes
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DbHandler> m_dbHandler; ///< Pointer to DB handler
|
||||
std::shared_ptr<HandlerConfigureAlarms> m_handlerConfigureAlarms;
|
||||
std::shared_ptr<HandlerParticipant> m_handlerParticipant; ///< Pointer to handler for all participants
|
||||
std::shared_ptr<HandlerEmergencyCall> m_handlerEmergencyCall;
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
};
|
||||
} // namespace MessagingDataManagement
|
||||
@@ -9,13 +9,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include <AlarmManagement/svcalmcommon_export.h>
|
||||
#include "alm_export.h"
|
||||
|
||||
namespace AlarmManagement
|
||||
{
|
||||
using LOGGER_T = NGL::INGLLogger &;
|
||||
|
||||
SVCALMCOMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
ALM_COMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
inline LOGGER_T getLogger(const QString &loggerName)
|
||||
{
|
||||
return getLogger(loggerName.toUtf8().constData());
|
||||
|
||||
+5
-3
@@ -4,9 +4,11 @@
|
||||
|
||||
namespace AlarmManagement{
|
||||
|
||||
ObjectEmergencyCall::ObjectEmergencyCall(Initialization *mainHandler, QObject *parent) : QObject(parent)
|
||||
, m_mainHandler(mainHandler),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
ObjectEmergencyCall::ObjectEmergencyCall(Initialization *mainHandler, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectEmergencyCall"))
|
||||
{
|
||||
}
|
||||
|
||||
ObjectEmergencyCall::~ObjectEmergencyCall()
|
||||
|
||||
@@ -1,10 +1,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 <AlarmManagement/alm_db.h>
|
||||
|
||||
@@ -32,9 +32,10 @@ protected Q_SLOTS:
|
||||
void onPublishData();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
Initialization *m_mainHandler;
|
||||
Database::AlmEmergencyCall m_data;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user