From 20b2f5569958b6aa4d2a7efdf02a3c37d87ee2ee Mon Sep 17 00:00:00 2001 From: Rex Schilasky <49162693+rex-schilasky@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:33:34 +0200 Subject: [PATCH 1/3] [app] ecalmon layer detection logic (#1568) ecalmon_gui / tui layer detection improved --- .../src/widgets/models/topic_tree_item.cpp | 33 ++++++++++--------- app/mon/mon_tui/src/model/monitor.hpp | 5 ++- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/app/mon/mon_gui/src/widgets/models/topic_tree_item.cpp b/app/mon/mon_gui/src/widgets/models/topic_tree_item.cpp index 6bf48e2cb3..eb2e68e00c 100644 --- a/app/mon/mon_gui/src/widgets/models/topic_tree_item.cpp +++ b/app/mon/mon_gui/src/widgets/models/topic_tree_item.cpp @@ -209,22 +209,25 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const for (const auto& layer : layer_pb) { QString this_layer_string; - switch (layer.type()) + if (layer.confirmed()) { - case eCAL::pb::eTLayerType::tl_ecal_tcp: - this_layer_string = "tcp"; - break; - case eCAL::pb::eTLayerType::tl_ecal_udp_mc: - this_layer_string = "udp_mc"; - break; - case eCAL::pb::eTLayerType::tl_ecal_shm: - this_layer_string = "shm"; - break; - case eCAL::pb::eTLayerType::tl_all: - this_layer_string = "all"; - break; - default: - this_layer_string = ("Unknown (" + QString::number((int)layer.type()) + ")"); + switch (layer.type()) + { + case eCAL::pb::eTLayerType::tl_ecal_tcp: + this_layer_string = "tcp"; + break; + case eCAL::pb::eTLayerType::tl_ecal_udp_mc: + this_layer_string = "udp_mc"; + break; + case eCAL::pb::eTLayerType::tl_ecal_shm: + this_layer_string = "shm"; + break; + case eCAL::pb::eTLayerType::tl_all: + this_layer_string = "all"; + break; + default: + this_layer_string = ("Unknown (" + QString::number((int)layer.type()) + ")"); + } } if (!layer_string.isEmpty() && !this_layer_string.isEmpty()) diff --git a/app/mon/mon_tui/src/model/monitor.hpp b/app/mon/mon_tui/src/model/monitor.hpp index 1a87994939..63170a3ab6 100644 --- a/app/mon/mon_tui/src/model/monitor.hpp +++ b/app/mon/mon_tui/src/model/monitor.hpp @@ -204,7 +204,10 @@ class MonitorModel topic.type_descriptor = std::move(*t.mutable_tdatatype()->mutable_desc()); for(auto &tl: t.tlayer()) { - topic.transport_layers.emplace_back(TopicTransportLayer(tl.type())); + if (tl.confirmed()) + { + topic.transport_layers.emplace_back(TopicTransportLayer(tl.type())); + } } topic.size = t.tsize(); topic.local_connections_count = t.connections_loc(); From 5e99ac634692ddf74eb3bd659dfd134c0377ca50 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:44:47 +0200 Subject: [PATCH 2/3] [Core] Added missing include (#1572) --- ecal/core/include/ecal/ecal_util.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ecal/core/include/ecal/ecal_util.h b/ecal/core/include/ecal/ecal_util.h index 7cfc6d2b04..0a666ee344 100644 --- a/ecal/core/include/ecal/ecal_util.h +++ b/ecal/core/include/ecal/ecal_util.h @@ -27,6 +27,8 @@ #include #include #include + +#include #include #include #include From 28279a6349a80cc6148963e80da736ae33e415b3 Mon Sep 17 00:00:00 2001 From: Peguen <73380451+Peguen@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:46:11 +0200 Subject: [PATCH 3/3] [CMake] Added CMAKE_POSITION_INDEPENDENT_CODE ON to qt relevant builds (#1569) --- app/mon/mon_plugins/monitor_tree_view/CMakeLists.txt | 2 ++ lib/CustomQt/CMakeLists.txt | 2 ++ lib/CustomTclap/CMakeLists.txt | 2 ++ lib/QEcalParser/CMakeLists.txt | 2 ++ lib/ThreadingUtils/CMakeLists.txt | 2 ++ lib/ecal_utils/CMakeLists.txt | 2 ++ thirdparty/qwt/CMakeLists.txt | 2 ++ 7 files changed, 14 insertions(+) diff --git a/app/mon/mon_plugins/monitor_tree_view/CMakeLists.txt b/app/mon/mon_plugins/monitor_tree_view/CMakeLists.txt index bd2f1c99a2..2e86602c2c 100644 --- a/app/mon/mon_plugins/monitor_tree_view/CMakeLists.txt +++ b/app/mon/mon_plugins/monitor_tree_view/CMakeLists.txt @@ -18,6 +18,8 @@ project(MonitorTreeView) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + # Legacy Qt5 (pre 5.15) support as suggested by teh Qt Documentation: # https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html#supporting-older-qt-5-versions find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Widgets) diff --git a/lib/CustomQt/CMakeLists.txt b/lib/CustomQt/CMakeLists.txt index 0e93dba090..24fa75d6f4 100644 --- a/lib/CustomQt/CMakeLists.txt +++ b/lib/CustomQt/CMakeLists.txt @@ -18,6 +18,8 @@ project(CustomQt) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + # Legacy Qt5 (pre 5.15) support as suggested by teh Qt Documentation: # https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html#supporting-older-qt-5-versions find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Widgets) diff --git a/lib/CustomTclap/CMakeLists.txt b/lib/CustomTclap/CMakeLists.txt index ad8b35f214..daaae09d15 100644 --- a/lib/CustomTclap/CMakeLists.txt +++ b/lib/CustomTclap/CMakeLists.txt @@ -18,6 +18,8 @@ project(CustomTclap) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + find_package(tclap REQUIRED) set(include_files diff --git a/lib/QEcalParser/CMakeLists.txt b/lib/QEcalParser/CMakeLists.txt index 9a5fda1be6..1ee2a39801 100644 --- a/lib/QEcalParser/CMakeLists.txt +++ b/lib/QEcalParser/CMakeLists.txt @@ -18,6 +18,8 @@ project(QEcalParser) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + # Legacy Qt5 (pre 5.15) support as suggested by teh Qt Documentation: # https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html#supporting-older-qt-5-versions find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Widgets) diff --git a/lib/ThreadingUtils/CMakeLists.txt b/lib/ThreadingUtils/CMakeLists.txt index 28d9268c07..a8222da9e1 100644 --- a/lib/ThreadingUtils/CMakeLists.txt +++ b/lib/ThreadingUtils/CMakeLists.txt @@ -18,6 +18,8 @@ project(ThreadingUtils) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + find_package(Threads REQUIRED) set (threading_utils_includes diff --git a/lib/ecal_utils/CMakeLists.txt b/lib/ecal_utils/CMakeLists.txt index c6a4c6cd49..2f31c93c3c 100644 --- a/lib/ecal_utils/CMakeLists.txt +++ b/lib/ecal_utils/CMakeLists.txt @@ -17,6 +17,8 @@ # ========================= eCAL LICENSE ================================= project(ecal-utils) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + find_package(Threads REQUIRED) set (ecal_utils_includes diff --git a/thirdparty/qwt/CMakeLists.txt b/thirdparty/qwt/CMakeLists.txt index 61173c8cf8..5db44b880f 100644 --- a/thirdparty/qwt/CMakeLists.txt +++ b/thirdparty/qwt/CMakeLists.txt @@ -7,6 +7,8 @@ endif() project(qwt VERSION 6.2.0) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + # Legacy Qt5 (pre 5.15) support as suggested by teh Qt Documentation: # https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html#supporting-older-qt-5-versions find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets OpenGL Svg Concurrent PrintSupport)