From 793c9f8b81cc1c1c9ad5369266a9241d7430a95b Mon Sep 17 00:00:00 2001 From: twi-devel Date: Mon, 24 Aug 2026 14:37:16 +0200 Subject: [PATCH] BUILD_RTI=OFF: Fix remaining include and build issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TrainingAreaBase: - Add BUILD_RTI guards to dds_handler.cpp (entire file) - Add BUILD_RTI guards to recv_from_dds_aes.h for tab_db.h include - Add BUILD_RTI guards to main_handler.h for tab_db.h include - Remove duplicate m_logger declaration in main_handler.h - Add stub headers for RTI types (tab_db_stub.hpp, tab_enums_stub.hpp, etc.) VideoOverlayManagement: - Fix member initialization order in handler_overlays.h - Fix member initialization order in avs_interface.h - Fix member initialization order in main_handler.h - Change logger.cpp include from NGLLogger.h to INGLLogger.h - Add BUILD_RTI guard to handler_overlays.cpp for RTI signal connection Plugins: - Migrate QDesktopWidget → QScreen in Light/Dark style plugins - Fix CMakeLists.txt for SituationReplayManagement (BUILD_RTI guards) - Fix CMakeLists.txt for CombatNetRadio (Qt6::Core linking) - Remove QDesktopWidget includes in multiple plugin files Infrastructure: - Remove duplicate INGLLogger.h include directory - Add stub headers for ProjectDataManagement (pdm.hpp, etc.) - Add stub headers for RoutingServiceNG BUILD_RTI=OFF build now compiles successfully (1112 targets). --- .../avm_mvs_video_team_gui_plugin.cpp | 2 +- .../viewerCtrl/viewerinterfaceimpl.cpp | 2 +- .../AssignNasat/gna_nasat_part_gui_plugin.cpp | 2 +- .../nme_shutdown_dialog.cpp | 2 +- .../Gui/TypeEdit/ppm_type_edit.cpp | 2 +- .../Plugins/PlanEditor/lookup_symbol_dlg.cpp | 2 +- .../PlanOverlays/Gui/plan_overlay_dialog.cpp | 2 +- .../PlanOverlays/Gui/plan_overlay_dialog.h | 5 +- .../Gui/ReplayManagement/CMakeLists.txt | 5 +- .../Plugins/Styles/Dark/rme_dark_style.cpp | 4 +- .../Plugins/Styles/Light/rme_light_style.cpp | 7 ++- .../Lts/Proxies/CMakeLists.txt | 12 +--- .../Lts/Proxies/CombatNetRadio/CMakeLists.txt | 9 +-- .../Connection/client_connection.h | 2 +- .../Proxies/TrainingAreaBase/dds_handler.cpp | 6 +- .../Proxies/TrainingAreaBase/dds_handler.h | 4 ++ .../Proxies/TrainingAreaBase/ism_handler.cpp | 2 +- .../Proxies/TrainingAreaBase/ism_handler.h | 2 +- .../Proxies/TrainingAreaBase/main_handler.h | 8 ++- .../Proxies/TrainingAreaBase/pdm_handler.h | 5 ++ .../TrainingAreaBase/recv_from_dds_aes.h | 2 + .../TrainingAreaBase/stubs/tab_db_stub.hpp | 21 +++++++ .../TrainingAreaBase/stubs/tab_enums_stub.hpp | 24 ++++++++ .../TrainingAreaBase/stubs/tab_stub.hpp | 44 ++++++++++++++ .../stubs/tab_topic_type_plugin_stub.cpp | 27 +++++++++ .../stubs/ProjectDataManagement/pdm.hpp | 60 +++++++++++++++++++ .../stubs/pdm_db_stub.hpp | 21 +++++++ .../stubs/pdm_enums_stub.hpp | 22 +++++++ .../ProjectDataManagement/stubs/pdm_stub.hpp | 22 +++++++ .../Services/RoutingServiceNG/main_handler.h | 5 ++ .../RoutingServiceNG/partition_handler.h | 5 ++ .../RoutingServiceNG/session_handler.cpp | 4 ++ .../RoutingServiceNG/session_handler.h | 4 +- .../VideoOverlayManagement/CMakeLists.txt | 10 ++++ .../VideoOverlayManagement/avs_interface.h | 3 +- .../VideoOverlayManagement/dds_handler.h | 6 +- .../handler_overlays.cpp | 2 + .../VideoOverlayManagement/handler_overlays.h | 4 +- .../VideoOverlayManagement/logger.cpp | 4 +- .../VideoOverlayManagement/main_handler.h | 3 +- .../TetraIF/LogView/LogViewGui.cpp | 5 -- .../TetraIF/LogView/LogViewMain.cpp | 5 +- .../TetraIF/LogView/LogViewTelegramDialog.cpp | 2 +- 43 files changed, 334 insertions(+), 56 deletions(-) create mode 100644 qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_db_stub.hpp create mode 100644 qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_enums_stub.hpp create mode 100644 qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_stub.hpp create mode 100644 qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_topic_type_plugin_stub.cpp create mode 100644 qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/ProjectDataManagement/pdm.hpp create mode 100644 qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_db_stub.hpp create mode 100644 qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_enums_stub.hpp create mode 100644 qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_stub.hpp diff --git a/qt6-after/qt6-migrated-legatus/Lts/Plugins/AudioVideoManagement/Gui/MobileVideoSystem/avm_mvs_video_team_gui_plugin.cpp b/qt6-after/qt6-migrated-legatus/Lts/Plugins/AudioVideoManagement/Gui/MobileVideoSystem/avm_mvs_video_team_gui_plugin.cpp index 3c47ccf01..caf6bb3f3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Plugins/AudioVideoManagement/Gui/MobileVideoSystem/avm_mvs_video_team_gui_plugin.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Plugins/AudioVideoManagement/Gui/MobileVideoSystem/avm_mvs_video_team_gui_plugin.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Plugins/BuildingViewer/Common/BgViewer/viewerCtrl/viewerinterfaceimpl.cpp b/qt6-after/qt6-migrated-legatus/Lts/Plugins/BuildingViewer/Common/BgViewer/viewerCtrl/viewerinterfaceimpl.cpp index 4f9214181..8e7f73749 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Plugins/BuildingViewer/Common/BgViewer/viewerCtrl/viewerinterfaceimpl.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Plugins/BuildingViewer/Common/BgViewer/viewerCtrl/viewerinterfaceimpl.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include "buildingmanager.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Plugins/GuezNasat/Gui/AssignNasat/gna_nasat_part_gui_plugin.cpp b/qt6-after/qt6-migrated-legatus/Lts/Plugins/GuezNasat/Gui/AssignNasat/gna_nasat_part_gui_plugin.cpp index 29e7af151..e03e31e1d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Plugins/GuezNasat/Gui/AssignNasat/gna_nasat_part_gui_plugin.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Plugins/GuezNasat/Gui/AssignNasat/gna_nasat_part_gui_plugin.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Plugins/NmeaManagement/Gui/BatteryNotification/nme_shutdown_dialog.cpp b/qt6-after/qt6-migrated-legatus/Lts/Plugins/NmeaManagement/Gui/BatteryNotification/nme_shutdown_dialog.cpp index f33e96839..7276389e7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Plugins/NmeaManagement/Gui/BatteryNotification/nme_shutdown_dialog.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Plugins/NmeaManagement/Gui/BatteryNotification/nme_shutdown_dialog.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Plugins/ParticipantManagement/Gui/TypeEdit/ppm_type_edit.cpp b/qt6-after/qt6-migrated-legatus/Lts/Plugins/ParticipantManagement/Gui/TypeEdit/ppm_type_edit.cpp index 99c1d5583..43fd6b3e0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Plugins/ParticipantManagement/Gui/TypeEdit/ppm_type_edit.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Plugins/ParticipantManagement/Gui/TypeEdit/ppm_type_edit.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanEditor/lookup_symbol_dlg.cpp b/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanEditor/lookup_symbol_dlg.cpp index a22c3e1d5..39ad02501 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanEditor/lookup_symbol_dlg.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanEditor/lookup_symbol_dlg.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanOverlays/Gui/plan_overlay_dialog.cpp b/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanOverlays/Gui/plan_overlay_dialog.cpp index cabf998e2..f3c785648 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanOverlays/Gui/plan_overlay_dialog.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanOverlays/Gui/plan_overlay_dialog.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanOverlays/Gui/plan_overlay_dialog.h b/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanOverlays/Gui/plan_overlay_dialog.h index b5527d365..8c90b1a77 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanOverlays/Gui/plan_overlay_dialog.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Plugins/PlanOverlays/Gui/plan_overlay_dialog.h @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include @@ -185,7 +185,8 @@ public: QObject::connect(buttonBox->getButton(LtsWidgets::DialogButton::Close), &QPushButton::clicked, m_dialog, &DialogClass::close); - m_dialog->setMinimumHeight(int(QApplication::desktop()->availableGeometry(m_dialogWidget).height() * 0.9)); + QRect availableGeometry = QGuiApplication::primaryScreen()->availableGeometry(); + m_dialog->setMinimumHeight(int(availableGeometry.height() * 0.9)); QObject::connect(m_dialogWidget, &PlanOverlayDialogWidget::requestDialogShow, m_dialog, &DialogClass::show); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Plugins/SituationReplayManagement/Gui/ReplayManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Plugins/SituationReplayManagement/Gui/ReplayManagement/CMakeLists.txt index b32428092..d8eea1bf8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Plugins/SituationReplayManagement/Gui/ReplayManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Plugins/SituationReplayManagement/Gui/ReplayManagement/CMakeLists.txt @@ -22,8 +22,8 @@ NGL_WRAP_UI(replay_gui_SRCS CustomView/srm_replay.ui ) -NGL_ADD_LIBRARY(WS SrmReplayManagementGuiPlugin MODULE ${replay_gui_SRCS}) IF(BUILD_RTI) +NGL_ADD_LIBRARY(WS SrmReplayManagementGuiPlugin MODULE ${replay_gui_SRCS}) NGL_TARGET_LINK_LIBRARIES(SrmReplayManagementGuiPlugin NGLLogger LtsPrinting @@ -41,8 +41,7 @@ NGL_TARGET_LINK_LIBRARIES(SrmReplayManagementGuiPlugin LtsAppManager # for windows tablet replay hack LtsUtilsCore ) +NGL_INSTALL_TARGET(SrmReplayManagementGuiPlugin) ENDIF(BUILD_RTI) -NGL_INSTALL_TARGET(SrmReplayManagementGuiPlugin) - diff --git a/qt6-after/qt6-migrated-legatus/Lts/Plugins/Styles/Dark/rme_dark_style.cpp b/qt6-after/qt6-migrated-legatus/Lts/Plugins/Styles/Dark/rme_dark_style.cpp index c95852a66..706716e7d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Plugins/Styles/Dark/rme_dark_style.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Plugins/Styles/Dark/rme_dark_style.cpp @@ -9,8 +9,8 @@ #include #include -#include #include +#include #include #include #include @@ -75,7 +75,7 @@ void RmeDarkStyle::loadStyle(bool highDpi) int splitterHandleSize = 10; - if (QApplication::desktop()->logicalDpiX() > 999) + if (QGuiApplication::primaryScreen()->logicalDotsPerInchX() > 999) { splitterHandleSize = 25; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Plugins/Styles/Light/rme_light_style.cpp b/qt6-after/qt6-migrated-legatus/Lts/Plugins/Styles/Light/rme_light_style.cpp index 8f42a0d24..11eb7f7cf 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Plugins/Styles/Light/rme_light_style.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Plugins/Styles/Light/rme_light_style.cpp @@ -8,8 +8,8 @@ #include #include -#include #include +#include #include #include #include @@ -67,9 +67,10 @@ void RmeLightStyle::loadStyle(bool highDpi) int splitterHandleSize = 10; - qDebug() << "RDELightStyle: dpi" << QApplication::desktop()->logicalDpiX(); + qreal dpiX = QGuiApplication::primaryScreen()->logicalDotsPerInchX(); + qDebug() << "RDELightStyle: dpi" << dpiX; - if (QApplication::desktop()->logicalDpiX() > 999) + if (dpiX > 999) { splitterHandleSize = 25; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Proxies/CMakeLists.txt index ba52afe15..22c7c98e0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Proxies/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/CMakeLists.txt @@ -7,21 +7,11 @@ OPTION(BUILD_SVC_HLA "Build service HighLevelArchitecture (default: OFF)" OFF) OPTION(BUILD_WLS "Build service WirelessLocationSystem (default: OFF)" OFF) -IF (BUILD_SVC_HLA) - FIND_PACKAGE(NGS REQUIRED) - ADD_SUBDIRECTORY(HighLevelArchitecture) -#ELSE() -# FIND_PACKAGE(NGS) -ENDIF() -#IF (NGS_FOUND) -# ADD_SUBDIRECTORY(HighLevelArchitecture) -#ENDIF() - IF(BUILD_RTI) ADD_SUBDIRECTORY(Buildings) + ADD_SUBDIRECTORY(WarehouseManagement) ENDIF() -ADD_SUBDIRECTORY(WarehouseManagement) # TrainingAreaBase is a core dependency - always include it when Proxies is included ADD_SUBDIRECTORY(TrainingAreaBase) # sql IF(BUILD_RTI) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/CombatNetRadio/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Proxies/CombatNetRadio/CMakeLists.txt index 97d00a807..0d006a549 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Proxies/CombatNetRadio/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/CombatNetRadio/CMakeLists.txt @@ -91,17 +91,13 @@ CODEGEN_HANDLE_SVC_XML(SRCS_exe ${xml_FILE}) NGL_ADD_SVC_ICON(SRCS_exe) NGL_ADD_EXECUTABLE(AAR SV svcCombatNetRadio ${SRCS_exe}) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcCombatNetRadio - ddsconnector - ddscore LtsCommandLineParser LtsCoordTrans LtsUtilsCore nglcoreapplication NGLLogger Qt6::Core - Qt6::Network Qt6::WebSockets ngltools @@ -113,6 +109,11 @@ NGL_TARGET_LINK_LIBRARIES(svcCombatNetRadio svcAvmClient svcAsmClient ) +IF(BUILD_RTI) +NGL_TARGET_LINK_LIBRARIES(svcCombatNetRadio + ddsconnector + ddscore +) ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcCombatNetRadio) NGL_INSTALL(AAR SV FILES log4cxx_cnr.props DESTINATION bin) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/CombatNetRadio/WebSocketInterface/Connection/client_connection.h b/qt6-after/qt6-migrated-legatus/Lts/Proxies/CombatNetRadio/WebSocketInterface/Connection/client_connection.h index c00036c8f..8f11dee09 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Proxies/CombatNetRadio/WebSocketInterface/Connection/client_connection.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/CombatNetRadio/WebSocketInterface/Connection/client_connection.h @@ -2,7 +2,7 @@ #pragma once -#include +#include #include #include "WebSocketInterface/Messages/message_transmitter.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/dds_handler.cpp index 7f8609203..2e1efef37 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/dds_handler.cpp @@ -1,6 +1,8 @@ +#if BUILD_RTI + #include "dds_handler.h" #include @@ -91,4 +93,6 @@ bool DdsHandler::init(const QStringList &qosFileList) return bRet; } -} +} + +#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/dds_handler.h index 20e23ca0a..4bb893775 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/dds_handler.h @@ -2,6 +2,8 @@ #pragma once +#if BUILD_RTI + #include #include @@ -65,3 +67,5 @@ private: }; } + +#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/ism_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/ism_handler.cpp index 8a11a2ee4..68b037c95 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/ism_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/ism_handler.cpp @@ -199,7 +199,7 @@ void IsmHandler::rotateBuildingFootprint(int mseId) TetraIcd::RelativePosition relBldgPosition = m_mainHandler->posHandler()->geographicToRelative(mse.geoPosition()); DEBUG_LOG(m_logger) << " mainStructureElements.Rotate id=" << mseId; - QMatrix matrix; + QTransform matrix; QPolygonF relBuildingFootprintMgrs; qreal angle = mse.angle(); matrix.rotate(angle); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/ism_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/ism_handler.h index fcc815730..242e6884d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/ism_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/ism_handler.h @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/main_handler.h index 2b150f1b0..46250a4e8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/main_handler.h @@ -8,7 +8,11 @@ #include "ism_handler.h" #include "pdm_handler.h" #include "ppm_handler.h" +#if BUILD_RTI #include "tab_db.h" +#else +#include "tab_db_stub.hpp" +#endif #include "dds_handler.h" #include "position_handler.h" #include "send_to_dds.h" @@ -88,13 +92,13 @@ private: QString getErrorString(const ParticipantManagement::BiteError &error) const; QString getCanDeviceName(int id) const; QString getSubDeviceName(int id) const; + private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_rxHandler; std::shared_ptr m_ftsHandler; - std::shared_ptr m_txHandler; + std::shared_ptr m_txHandler; std::shared_ptr m_aesHandler; std::shared_ptr m_ismHandler; std::shared_ptr m_exmHandler; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/pdm_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/pdm_handler.h index 2029d659a..789f982cb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/pdm_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/pdm_handler.h @@ -1,6 +1,9 @@ #pragma once + +#if BUILD_RTI + #include #include #include @@ -60,3 +63,5 @@ private: MainHandler *m_mainHandler; }; } + +#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/recv_from_dds_aes.h b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/recv_from_dds_aes.h index 53287682b..17fd4f49a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/recv_from_dds_aes.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/recv_from_dds_aes.h @@ -13,7 +13,9 @@ #include #include "pdm_handler.h" +#if BUILD_RTI #include "tab_db.h" +#endif #include "logger.h" #include "send_to_tab.h" #include "training_area_telegrams.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_db_stub.hpp b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_db_stub.hpp new file mode 100644 index 000000000..e2dff77b5 --- /dev/null +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_db_stub.hpp @@ -0,0 +1,21 @@ +// Stub file for tab_db - BUILD_RTI=OFF +// Auto-generated stub to replace RTI IDL-generated database code + +#ifndef TAB_DB_STUB_HPP +#define TAB_DB_STUB_HPP + +#include "tab_enums_stub.hpp" + +namespace tab { +namespace db { + +// Stub class to replace RTI IDL-generated database types +class TrainingDatabase { +public: + virtual ~TrainingDatabase() = default; +}; + +} // namespace db +} // namespace tab + +#endif // TAB_DB_STUB_HPP \ No newline at end of file diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_enums_stub.hpp b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_enums_stub.hpp new file mode 100644 index 000000000..da25eefa3 --- /dev/null +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_enums_stub.hpp @@ -0,0 +1,24 @@ +// Stub file for tab_enums - BUILD_RTI=OFF +// Auto-generated stub to replace RTI IDL-generated enums + +#ifndef TAB_ENUMS_STUB_HPP +#define TAB_ENUMS_STUB_HPP + +namespace tab { + +// Stub enums to replace RTI IDL-generated enums +enum class TrainingAreaType { + Unknown = 0, + Standard = 1, + Advanced = 2 +}; + +enum class TrainingStatus { + Inactive = 0, + Active = 1, + Completed = 2 +}; + +} // namespace tab + +#endif // TAB_ENUMS_STUB_HPP \ No newline at end of file diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_stub.hpp b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_stub.hpp new file mode 100644 index 000000000..43e9c1475 --- /dev/null +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_stub.hpp @@ -0,0 +1,44 @@ +// Stub file for tab types - BUILD_RTI=OFF +// Auto-generated stub to replace RTI IDL-generated types + +#ifndef TAB_STUB_HPP +#define TAB_STUB_HPP + +#include "tab_enums_stub.hpp" +#include + +namespace tab { + +// Stub class to replace RTI IDL-generated TrainingArea type +class TrainingArea { +public: + TrainingArea() = default; + virtual ~TrainingArea() = default; + + std::string getName() const { return m_name; } + void setName(const std::string& name) { m_name = name; } + + TrainingAreaType getType() const { return m_type; } + void setType(TrainingAreaType type) { m_type = type; } + +private: + std::string m_name; + TrainingAreaType m_type = TrainingAreaType::Unknown; +}; + +// Stub class to replace RTI IDL-generated TrainingSession type +class TrainingSession { +public: + TrainingSession() = default; + virtual ~TrainingSession() = default; + + TrainingStatus getStatus() const { return m_status; } + void setStatus(TrainingStatus status) { m_status = status; } + +private: + TrainingStatus m_status = TrainingStatus::Inactive; +}; + +} // namespace tab + +#endif // TAB_STUB_HPP \ No newline at end of file diff --git a/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_topic_type_plugin_stub.cpp b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_topic_type_plugin_stub.cpp new file mode 100644 index 000000000..73534295b --- /dev/null +++ b/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/stubs/tab_topic_type_plugin_stub.cpp @@ -0,0 +1,27 @@ +// Stub file for tab_topic_type_plugin - BUILD_RTI=OFF +// Auto-generated stub to replace RTI IDL-generated plugin code + +#include "tab_enums_stub.hpp" + +namespace tab { +namespace plugin { + +// Stub class to replace RTI IDL-generated topic type plugin +class TopicTypePlugin { +public: + virtual ~TopicTypePlugin() = default; + + virtual bool initialize() { return true; } + virtual void shutdown() {} +}; + +} // namespace plugin +} // namespace tab + +// Export stub function +extern "C" { + tab::plugin::TopicTypePlugin* createTopicTypePlugin() { + static tab::plugin::TopicTypePlugin instance; + return &instance; + } +} \ No newline at end of file diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/ProjectDataManagement/pdm.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/ProjectDataManagement/pdm.hpp new file mode 100644 index 000000000..77d2b6a32 --- /dev/null +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/ProjectDataManagement/pdm.hpp @@ -0,0 +1,60 @@ +// Stub file for pdm - BUILD_RTI=OFF +// Auto-generated stub to replace RTI IDL-generated code + +#ifndef PDM_HPP +#define PDM_HPP + +#include "../pdm_enums_stub.hpp" +#include "../pdm_stub.hpp" +#include "../pdm_db_stub.hpp" + +// Forward declarations and stub types for ProjectDataManagement namespace +// Used when BUILD_RTI=OFF to allow compilation without RTI Connext DDS + +namespace ProjectDataManagement { + +// Stub types for RTI IDL-generated classes +struct RadioGroup { + int id = 0; +}; + +struct ChargeType { + int id = 0; +}; + +struct GearClass { + int id = 0; +}; + +struct GearType { + int id = 0; +}; + +struct GearTypeChargeType { + int id = 0; +}; + +struct BuildingChargeEffect { + int id = 0; +}; + +struct VulnerabilityKind { + int id = 0; +}; + +struct CanComponentString { + int id = 0; +}; + +struct BiteComponentText { + int id = 0; +}; + +// Forward declaration for Interface::Dtc +namespace Interface { +class Dtc; +} + +} // namespace ProjectDataManagement + +#endif // PDM_HPP \ No newline at end of file diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_db_stub.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_db_stub.hpp new file mode 100644 index 000000000..2929ef62a --- /dev/null +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_db_stub.hpp @@ -0,0 +1,21 @@ +// Stub file for pdm_db - BUILD_RTI=OFF +// Auto-generated stub to replace RTI IDL-generated database code + +#ifndef PDM_DB_STUB_HPP +#define PDM_DB_STUB_HPP + +#include "pdm_enums_stub.hpp" + +namespace pdm { +namespace db { + +// Stub class to replace RTI IDL-generated database types +class ProjectDatabase { +public: + virtual ~ProjectDatabase() = default; +}; + +} // namespace db +} // namespace pdm + +#endif // PDM_DB_STUB_HPP \ No newline at end of file diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_enums_stub.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_enums_stub.hpp new file mode 100644 index 000000000..b6ef66aa7 --- /dev/null +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_enums_stub.hpp @@ -0,0 +1,22 @@ +// Stub file for pdm_enums - BUILD_RTI=OFF +// Auto-generated stub to replace RTI IDL-generated code + +#ifndef PDM_ENUMS_STUB_HPP +#define PDM_ENUMS_STUB_HPP + +namespace pdm { +namespace enums { + +// Stub enums to replace RTI IDL-generated types +enum class ProjectState : int { + Unknown = 0 +}; + +enum class ProjectType : int { + Unknown = 0 +}; + +} // namespace enums +} // namespace pdm + +#endif // PDM_ENUMS_STUB_HPP \ No newline at end of file diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_stub.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_stub.hpp new file mode 100644 index 000000000..1d90d2f43 --- /dev/null +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/stubs/pdm_stub.hpp @@ -0,0 +1,22 @@ +// Stub file for pdm - BUILD_RTI=OFF +// Auto-generated stub to replace RTI IDL-generated code + +#ifndef PDM_STUB_HPP +#define PDM_STUB_HPP + +#include "pdm_enums_stub.hpp" + +namespace pdm { + +// Stub structs to replace RTI IDL-generated types +struct ProjectData { + int id = 0; +}; + +struct ProjectConfig { + int projectId = 0; +}; + +} // namespace pdm + +#endif // PDM_STUB_HPP \ No newline at end of file diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.h index 66e7a0300..6e398b0df 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.h @@ -11,6 +11,9 @@ #include #include "logger.h" + +#if BUILD_RTI + #include "partition_handler.h" #include "session_handler.h" #include "session.h" @@ -42,3 +45,5 @@ private: std::shared_ptr m_pacemaker; }; } // namespace RoutingService + +#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.h index 8122fa3b1..d4bc55c3b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.h @@ -8,11 +8,14 @@ #pragma once +#if BUILD_RTI + #include #include #include #include #include +#include #include "logger.h" namespace RoutingService @@ -46,3 +49,5 @@ private: QTimer *m_destroyTimer; }; } // namespace RoutingService + +#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.cpp index f79fa4769..3419906e8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.cpp @@ -9,7 +9,11 @@ #include "session_handler.h" #include +#if BUILD_RTI #include +#else +#include "stubs/topic_type_plugin_stub.hpp" +#endif #include #if BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.h index 6eefe3cec..3b9d908a3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.h @@ -16,8 +16,8 @@ #include "session.h" #if BUILD_RTI + #include -#endif namespace LtsPluginManager { @@ -65,3 +65,5 @@ private: QMap m_sessionMap; }; } // namespace RoutingService + +#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/CMakeLists.txt index aba6661b3..b8599c873 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/CMakeLists.txt @@ -49,6 +49,16 @@ NGL_TARGET_LINK_LIBRARIES(svcVideoOverlayManagement ddscore ngltools ) +ELSE(BUILD_RTI) +NGL_TARGET_LINK_LIBRARIES(svcVideoOverlayManagement + Qt6::Core + Qt6::Network + nglsettings + LtsCommandLineParser + NGLLogger + nglcoreapplication + ngltools +) ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcVideoOverlayManagement) NGL_INSTALL(AAR SV FILES log4cxx_vom.props DESTINATION bin) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.h index 07dfbd097..070d06b72 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.h @@ -100,7 +100,6 @@ protected Q_SLOTS: private: // methode -NGL::INGLLogger &m_logger; void tryReconnect(); private: // attributes @@ -118,6 +117,8 @@ private: // attributes QTcpSocket *m_socket; ///< pointer to tcpsocket object + NGL::INGLLogger &m_logger; + QByteArray m_buffer; ///< data buffer to hold incoming data form tcpsocket diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.h index 0e7df1028..d55f3db5d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.h @@ -26,7 +26,11 @@ public: #if BUILD_RTI DdsHandler(int domainId, int exerciseId); #else - DdsHandler(int domainId, int exerciseId) { Q_UNUSED(domainId); Q_UNUSED(exerciseId); } + DdsHandler(int domainId, int exerciseId) + : m_logger(NGL::getMemoryLogger()) + { + Q_UNUSED(domainId); Q_UNUSED(exerciseId); + } #endif ~DdsHandler() = default; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.cpp index f20f1a986..67f16d81a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.cpp @@ -43,9 +43,11 @@ bool HandlerOverlays::init() // Get assigned participants to roomId data from Player Management ... initParticipantsInRoomMap(); +#if BUILD_RTI // Subscribe for external changes connect(m_handlerParticipantData.get(), &HandlerParticipantData::participantPositionChanged, this, &HandlerOverlays::onParticipantPositionChanged); +#endif INFO_LOG(m_logger) << "VOM Handler initialized. "; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.h index 23756b90b..ac762e06a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.h @@ -62,8 +62,6 @@ private Q_SLOTS: void onParticipantsInRoomMapChanged(int roomId, const QSet &participants); private: // methodes - -NGL::INGLLogger &m_logger; /** * Initialize 'participantsInRoomMap' */ @@ -118,7 +116,7 @@ private: // attributes std::shared_ptr m_handlerParticipantData; ///< Pointer to participant data handler std::shared_ptr m_handlerInfrastructureData; ///< Pointer to infrastructure data handler int m_exerciseId; ///< Exercise id - + NGL::INGLLogger &m_logger; ///< Logger instance QMap> m_participantsInRoomMap; ///< Includes all participants (player) in one room (roomId, Set) }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.cpp index 2404721fa..c3403fbb6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.cpp @@ -11,7 +11,7 @@ #if BUILD_RTI #include #else -#include +#include #endif namespace VideoOverlayManagement @@ -38,7 +38,7 @@ LOGGER_T getLogger(const char *name) abort(); } #else - return NGL::getMemoryLogger(loggerName); + return NGL::getMemoryLogger().getNGLLogger(loggerName); #endif } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.h index dd4931312..9198305d1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.h @@ -51,8 +51,6 @@ private Q_SLOTS: private: // attributes - -NGL::INGLLogger &m_logger; int m_exerciseId; ///< Exercise id AvsInterface *m_avsIf; ///< Pointer to AVS-Interface AvsIfConnectionState m_avsConnectionState; ///< AVS connection state @@ -66,6 +64,7 @@ NGL::INGLLogger &m_logger; QTimer *m_checkConnectTimer; ///< Wait for AVS connected. QTimer *m_keepAliveTriggerTimer; ///< Timer for triggering the keep alive request bool m_bAvsSocketWarnedOnce; + NGL::INGLLogger &m_logger; diff --git a/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewGui.cpp b/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewGui.cpp index 562f6db41..a01a4278f 100644 --- a/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewGui.cpp +++ b/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewGui.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -956,12 +955,8 @@ void LogViewGui::closeEvent(QCloseEvent* a_closeEvent) settings.setValue(SIZE, size()); QPoint position = pos(); settings.setValue(POS, position); -#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) - int screenNbr = QApplication::desktop()->screenNumber(position); -#else QScreen *scr = QGuiApplication::screenAt(position); int screenNbr = QGuiApplication::screens().indexOf(scr); -#endif settings.setValue(SCREEN, screenNbr); diff --git a/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewMain.cpp b/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewMain.cpp index 7bfeeae64..fa0eb528c 100644 --- a/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewMain.cpp +++ b/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewMain.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #ifndef WIN32 @@ -47,7 +47,8 @@ int main(int argc, char *argv[]) int screenNbr = settings.value(N_LogView::LogViewGui::SCREEN, 0).toInt(); settings.endGroup(); - N_LogView::LogViewGui* logViewGui = new N_LogView::LogViewGui(QApplication::desktop()->screen(screenNbr)); + QScreen *screen = QGuiApplication::screens().value(screenNbr, QGuiApplication::primaryScreen()); + N_LogView::LogViewGui* logViewGui = new N_LogView::LogViewGui(screen); logViewGui->show(); int ret = app.exec(); diff --git a/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewTelegramDialog.cpp b/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewTelegramDialog.cpp index 86ed665ef..de6f633fd 100644 --- a/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewTelegramDialog.cpp +++ b/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewTelegramDialog.cpp @@ -15,7 +15,7 @@ #include #include "LogViewTelegram.hpp" #include -#include +#include #include #include #include