Complete Qt6 migration: full clean build green across groups G1-G12 incl. runtime plugin set
new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
This commit is contained in:
1718 files changed
+126739
-18495
No files matched your search
+60
-70
@@ -4,7 +4,7 @@
|
||||
#include "ism_foreign_data_plugin.h"
|
||||
|
||||
#include <InfrastructureManagement/ism_resource_management_gui_plugin_interface.h>
|
||||
#include <InfrastructureManagement/ism_mounting_point.h>
|
||||
#include <InfrastructureManagement/Shared/ism_mounting_point.h>
|
||||
#include <InfrastructureManagement/ism_dtc.h>
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <LtsUtilsCore/json_object.h>
|
||||
@@ -32,16 +32,6 @@
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
|
||||
// Helper function to convert InfrastructureManagement::Interface::MainSchedule to ParticipantManagement::MainSchedule
|
||||
static ParticipantManagement::MainSchedule convertMainSchedule(const Interface::MainSchedule& ismSchedule)
|
||||
{
|
||||
ParticipantManagement::MainSchedule ppmSchedule;
|
||||
ppmSchedule.id = ismSchedule.id();
|
||||
// Note: Other fields (name, description, startTime, endTime, isActive) have no direct mapping
|
||||
// from InfrastructureManagement::MainSchedule, so they remain at default values
|
||||
return ppmSchedule;
|
||||
}
|
||||
|
||||
ForeignInterfaceImpl::ForeignInterfaceImpl(const std::shared_ptr<Interface::Dtc> &dtc, int exerciseId)
|
||||
: m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_dtc(dtc)
|
||||
@@ -121,10 +111,10 @@ MountingPoint ForeignInterfaceImpl::mountingPoint(int32_t mountingPointId) const
|
||||
return m_mountingPoints.value(mountingPointId);
|
||||
}
|
||||
|
||||
ParticipantManagement::MainSchedule ForeignInterfaceImpl::mainSchedule(int32_t scheduleId)
|
||||
MainSchedule ForeignInterfaceImpl::mainSchedule(int32_t scheduleId)
|
||||
{
|
||||
enableIsmForeignInterface();
|
||||
return convertMainSchedule(m_dtc->mainSchedule(scheduleId));
|
||||
return m_dtc->mainSchedule(scheduleId);
|
||||
}
|
||||
|
||||
void ForeignInterfaceImpl::setScheduleId(int32_t scheduleId)
|
||||
@@ -135,7 +125,7 @@ void ForeignInterfaceImpl::setScheduleId(int32_t scheduleId)
|
||||
enableIsmForeignInterface();
|
||||
|
||||
m_scheduleId = scheduleId;
|
||||
onMainScheduleChanged(m_dtc->mainSchedule(scheduleId), InfrastructureManagement::Interface::DataModification::eModified);
|
||||
onMainScheduleChanged(m_dtc->mainSchedule(scheduleId), DataModification::eModified);
|
||||
emit scheduleIdChanged(m_scheduleId);
|
||||
}
|
||||
|
||||
@@ -163,27 +153,27 @@ bool ForeignInterfaceImpl::isBuildingsInCurrentExercise(int buildingId) const
|
||||
return m_bldgsInExcersise.contains(buildingId);
|
||||
}
|
||||
|
||||
void ForeignInterfaceImpl::onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &data, InfrastructureManagement::Interface::DataModification modType)
|
||||
void ForeignInterfaceImpl::onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &data, DataModification modType)
|
||||
{
|
||||
const int mseId = data.id();
|
||||
const int mseId = data.id;
|
||||
|
||||
switch (modType)
|
||||
{
|
||||
case InfrastructureManagement::Interface::DataModification::eRemoved:
|
||||
case DataModification::eRemoved:
|
||||
{
|
||||
QMutexLocker locker(&m_mutex);
|
||||
|
||||
const auto &structureElements = data.elements();
|
||||
const auto &structureElements = data.elements;
|
||||
for (const StructureElement ¤tStructEle : structureElements)
|
||||
{
|
||||
if (currentStructEle.mountingPointTypeId() == MountingPointType::Undefined)
|
||||
if (currentStructEle.mountingPointTypeId == MountingPointType::Unknown)
|
||||
continue;
|
||||
m_mountingPoints.remove(currentStructEle.id());
|
||||
m_mountingPoints.remove(currentStructEle.id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case InfrastructureManagement::Interface::DataModification::eAdded:
|
||||
case InfrastructureManagement::Interface::DataModification::eModified:
|
||||
case DataModification::eAdded:
|
||||
case DataModification::eModified:
|
||||
{
|
||||
QVector<int> exeIds;
|
||||
|
||||
@@ -192,14 +182,14 @@ void ForeignInterfaceImpl::onMainStructureElementChanged(const InfrastructureMan
|
||||
{
|
||||
QJsonParseError parserError;
|
||||
|
||||
const auto &structureElements = data.elements();
|
||||
const auto &structureElements = data.elements;
|
||||
if (!structureElements.empty())
|
||||
{
|
||||
const QByteArray &content = QByteArray::fromStdString(structureElements[0].properties());
|
||||
const QByteArray &content = QByteArray::fromStdString(structureElements[0].properties);
|
||||
|
||||
const QJsonDocument doc(QJsonDocument::fromJson(content, &parserError));
|
||||
if (parserError.error != QJsonParseError::NoError)
|
||||
WARNING_LOG(m_logger) << "Invalid properties for MSE " << data.id() << ", " << data.name();
|
||||
WARNING_LOG(m_logger) << "Invalid properties for MSE " << data.id << ", " << data.name;
|
||||
else
|
||||
{
|
||||
const QJsonArray exercises(QJsonObject(doc.object()).value(QStringLiteral("available_in_exercise")).toArray());
|
||||
@@ -239,7 +229,7 @@ void ForeignInterfaceImpl::onMainStructureElementChanged(const InfrastructureMan
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " m_bldgsInExcersise updated."
|
||||
<< " (mseId=" << mseId << " name=" << data.name();
|
||||
<< " (mseId=" << mseId << " name=" << data.name;
|
||||
emit buildingsInCurrentExerciseChanged();
|
||||
}
|
||||
}
|
||||
@@ -251,52 +241,52 @@ void ForeignInterfaceImpl::onMainStructureElementChanged(const InfrastructureMan
|
||||
|
||||
if (m_exerciseId == 0 || (m_exerciseId > 0 && exeIds.contains(m_exerciseId)))
|
||||
{
|
||||
const auto &structureElements = data.elements();
|
||||
const auto &structureElements = data.elements;
|
||||
for (const StructureElement ¤tStructEle : structureElements)
|
||||
{
|
||||
if (currentStructEle.mountingPointTypeId() == MountingPointType::Undefined)
|
||||
if (currentStructEle.mountingPointTypeId == MountingPointType::Unknown)
|
||||
continue;
|
||||
|
||||
StructureElement seFloor;
|
||||
const std::vector<int32_t> &curPath = currentStructEle.path();
|
||||
const std::vector<int32_t> &curPath = currentStructEle.path;
|
||||
if (curPath.size() == 4)
|
||||
{
|
||||
|
||||
|
||||
if (!m_dtc->getStructureElementById(curPath[1], seFloor))
|
||||
|
||||
|
||||
if (!m_dtc->getStructureElementById(curPath[1], seFloor))
|
||||
WARNING_LOG(m_logger) << " getStructureElementById failed for " << curPath[1];
|
||||
|
||||
}
|
||||
|
||||
const int floorId = QString::fromStdString(seFloor.name()).split(QStringLiteral("_")).value(1, QStringLiteral("-10")).toInt();
|
||||
const int floorId = QString::fromStdString(seFloor.name).split(QStringLiteral("_")).value(1, QStringLiteral("-10")).toInt();
|
||||
|
||||
{
|
||||
QMutexLocker locker(&m_mutex);
|
||||
|
||||
|
||||
const auto it = m_mountingPoints.find(currentStructEle.id());
|
||||
const auto it = m_mountingPoints.find(currentStructEle.id);
|
||||
if (it != m_mountingPoints.end())
|
||||
{
|
||||
MountingPoint &mountingPointRef = *it;
|
||||
|
||||
if (mountingPointRef.data().id() == currentStructEle.id())
|
||||
if (mountingPointRef.data().id == currentStructEle.id)
|
||||
continue;
|
||||
|
||||
mountingPointRef.updateData(currentStructEle, floorId);
|
||||
emit mountingPointChanged(mountingPointRef, ParticipantManagement::DataModification::eModified);
|
||||
emit mountingPointChanged(mountingPointRef, DataModification::eModified);
|
||||
} else {
|
||||
DEBUG_LOG(m_logger) << "New Mounting point with id " << currentStructEle.id()
|
||||
<< " and type " << static_cast<int>(currentStructEle.mountingPointTypeId())
|
||||
<< " subid: " << currentStructEle.mountingPointId() << this;
|
||||
DEBUG_LOG(m_logger) << "New Mounting point with id " << currentStructEle.id
|
||||
<< " and type " << static_cast<int>(currentStructEle.mountingPointTypeId)
|
||||
<< " subid: " << currentStructEle.mountingPointId << this;
|
||||
|
||||
MountingPoint newMountingPoint(currentStructEle, floorId);
|
||||
const int assetId = m_mountingPointAssetMap.value(newMountingPoint.data().id(), -1);
|
||||
const int assetId = m_mountingPointAssetMap.value(newMountingPoint.data().id, -1);
|
||||
newMountingPoint.setAssociatedAssetId(assetId);
|
||||
|
||||
|
||||
m_mountingPoints.insert(newMountingPoint.data().id(), newMountingPoint);
|
||||
emit mountingPointChanged(newMountingPoint, ParticipantManagement::DataModification::eAdded);
|
||||
}
|
||||
|
||||
m_mountingPoints.insert(newMountingPoint.data().id, newMountingPoint);
|
||||
emit mountingPointChanged(newMountingPoint, DataModification::eAdded);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -306,11 +296,11 @@ void ForeignInterfaceImpl::onMainStructureElementChanged(const InfrastructureMan
|
||||
}
|
||||
}
|
||||
|
||||
void ForeignInterfaceImpl::onMountingPointAssetChanged(const InfrastructureManagement::MountingPointAsset &data, InfrastructureManagement::Interface::DataModification modType)
|
||||
void ForeignInterfaceImpl::onMountingPointAssetChanged(const InfrastructureManagement::MountingPointAsset &data, DataModification modType)
|
||||
{
|
||||
const int32_t structureElementId = data.structureElementId();
|
||||
const int32_t structureElementId = data.structureElementId;
|
||||
|
||||
DEBUG_LOG(m_logger) << "onMountingPointAssetChanged se id: " << structureElementId << ", assetId: " << data.assetId();
|
||||
DEBUG_LOG(m_logger) << "onMountingPointAssetChanged se id: " << structureElementId << ", assetId: " << data.assetId;
|
||||
|
||||
|
||||
|
||||
@@ -321,10 +311,10 @@ void ForeignInterfaceImpl::onMountingPointAssetChanged(const InfrastructureManag
|
||||
|
||||
MountingPoint &mpRef = m_mountingPoints[structureElementId];
|
||||
|
||||
if (modType == InfrastructureManagement::Interface::DataModification::eRemoved)
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
m_mountingPointAssetMap.remove(structureElementId);
|
||||
if (mpRef.data().id() > 0)
|
||||
if (mpRef.data().id > 0)
|
||||
{
|
||||
mpRef.setAssociatedAssetId(-1);
|
||||
mpRef.setHasAssociatedAssetDefect(false);
|
||||
@@ -332,43 +322,43 @@ void ForeignInterfaceImpl::onMountingPointAssetChanged(const InfrastructureManag
|
||||
}
|
||||
else
|
||||
{
|
||||
m_mountingPointAssetMap.insert(structureElementId, data.assetId());
|
||||
if (mpRef.data().id() > 0)
|
||||
m_mountingPointAssetMap.insert(structureElementId, data.assetId);
|
||||
if (mpRef.data().id > 0)
|
||||
{
|
||||
mpRef.setAssociatedAssetId(data.assetId());
|
||||
mpRef.setHasAssociatedAssetDefect(m_dtc->instrumentationAsset(data.assetId()).assetStateId() == Interface::InstrumentationAssetState::Defect);
|
||||
mpRef.setAssociatedAssetId(data.assetId);
|
||||
mpRef.setHasAssociatedAssetDefect(m_dtc->instrumentationAsset(data.assetId).assetStateId == InstrumentationAssetState::Defect);
|
||||
}
|
||||
}
|
||||
|
||||
if (mpRef.data().id() > 0)
|
||||
emit mountingPointChanged(mpRef, ParticipantManagement::DataModification::eModified);
|
||||
if (mpRef.data().id > 0)
|
||||
emit mountingPointChanged(mpRef, DataModification::eModified);
|
||||
}
|
||||
|
||||
void ForeignInterfaceImpl::onMainScheduleChanged(const InfrastructureManagement::Interface::MainSchedule &data, InfrastructureManagement::Interface::DataModification modType)
|
||||
void ForeignInterfaceImpl::onMainScheduleChanged(const InfrastructureManagement::MainSchedule &data, DataModification modType)
|
||||
{
|
||||
if (m_scheduleId != data.id())
|
||||
if (m_scheduleId != data.id)
|
||||
return;
|
||||
|
||||
Q_UNUSED(modType);
|
||||
|
||||
QHash<int, Interface::MountingPointPlan> mppMap;
|
||||
for (const auto &elem : data.elements())
|
||||
mppMap[elem.structureElementId()] = elem;
|
||||
QHash<int, MountingPointPlan> mppMap;
|
||||
for (const auto &elem : data.elements)
|
||||
mppMap[elem.structureElementId] = elem;
|
||||
|
||||
|
||||
for (MountingPoint &mp : m_mountingPoints)
|
||||
{
|
||||
const Interface::MountingPointPlan &mpp = mppMap[mp.data().id()];
|
||||
const MountingPointState &mps = mpp.mountingPointState();
|
||||
const MountingPointPlan &mpp = mppMap[mp.data().id];
|
||||
const MountingPointState &mps = mpp.mountingPointState;
|
||||
|
||||
|
||||
if(mpp.structureElementId() != mp.data().id())
|
||||
|
||||
if(mpp.structureElementId != mp.data().id)
|
||||
{
|
||||
|
||||
if (mp.aimState() == MountingPointState::Idle)
|
||||
continue;
|
||||
mp.setAimState(MountingPointState::Idle);
|
||||
emit mountingPointChanged(mp, ParticipantManagement::DataModification::eModified);
|
||||
emit mountingPointChanged(mp, DataModification::eModified);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -376,7 +366,7 @@ void ForeignInterfaceImpl::onMainScheduleChanged(const InfrastructureManagement:
|
||||
continue;
|
||||
|
||||
mp.setAimState(mps);
|
||||
emit mountingPointChanged(mp, ParticipantManagement::DataModification::eModified);
|
||||
emit mountingPointChanged(mp, DataModification::eModified);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,7 +393,7 @@ void ForeignInterfaceImpl::init()
|
||||
#ifdef PROCESS_MSE_SEQUENTIELL
|
||||
m_dtc->mainStructureElements([this](const InfrastructureManagement::MainStructureElement &data)
|
||||
{
|
||||
onMainStructureElementChanged(data, InfrastructureManagement::Interface::DataModification::eAdded);
|
||||
onMainStructureElementChanged(data, DataModification::eAdded);
|
||||
});
|
||||
#else
|
||||
|
||||
@@ -424,20 +414,20 @@ void ForeignInterfaceImpl::init()
|
||||
|
||||
|
||||
QtConcurrent::blockingMap(mseMap, [this](const InfrastructureManagement::MainStructureElement &data) {
|
||||
onMainStructureElementChanged(data, InfrastructureManagement::Interface::DataModification::eAdded);
|
||||
onMainStructureElementChanged(data, DataModification::eAdded);
|
||||
});
|
||||
#endif
|
||||
|
||||
m_dtc->mountingPointAssets([this](const InfrastructureManagement::MountingPointAsset &data)
|
||||
{
|
||||
onMountingPointAssetChanged(data, InfrastructureManagement::Interface::DataModification::eAdded);
|
||||
onMountingPointAssetChanged(data, DataModification::eAdded);
|
||||
});
|
||||
|
||||
// mainSchedules() returns QMap, iterate and notify for each schedule
|
||||
const auto& schedulesMap = m_dtc->mainSchedules();
|
||||
for (auto it = schedulesMap.begin(); it != schedulesMap.end(); ++it)
|
||||
{
|
||||
onMainScheduleChanged(it.value(), InfrastructureManagement::Interface::DataModification::eAdded);
|
||||
onMainScheduleChanged(it.value(), DataModification::eAdded);
|
||||
}
|
||||
|
||||
int firstBldg = -1;
|
||||
|
||||
+4
-4
@@ -34,7 +34,7 @@ public:
|
||||
|
||||
|
||||
|
||||
ParticipantManagement::MainSchedule mainSchedule(int32_t scheduleId) override final;
|
||||
MainSchedule mainSchedule(int32_t scheduleId) override final;
|
||||
void setScheduleId(int32_t scheduleId) override final;
|
||||
int32_t scheduleId() const override final;
|
||||
|
||||
@@ -49,9 +49,9 @@ public:
|
||||
|
||||
|
||||
private Q_SLOTS:
|
||||
void onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &data, InfrastructureManagement::Interface::DataModification modType);
|
||||
void onMountingPointAssetChanged(const InfrastructureManagement::MountingPointAsset &data, InfrastructureManagement::Interface::DataModification modType);
|
||||
void onMainScheduleChanged(const InfrastructureManagement::Interface::MainSchedule &data, InfrastructureManagement::Interface::DataModification modType);
|
||||
void onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &data, DataModification modType);
|
||||
void onMountingPointAssetChanged(const InfrastructureManagement::MountingPointAsset &data, DataModification modType);
|
||||
void onMainScheduleChanged(const InfrastructureManagement::MainSchedule &data, DataModification modType);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
Reference in new issue
Block a user