Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen

- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung
- 44 Export-Header Include-Pfade korrigiert (_export.h)
- 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h)
- INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros
- Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits)
- FATAL_LOG Makro hinzugefügt
- InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h)
- FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h)
- AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp)
- SymbolAppearance Klasse vollständig definiert mit content() Methode
- BuildingComponentFilter Klasse definiert mit Copy-Konstruktor
- Ftc Factory: nullptr Return (abstract class)
- AesFilter Klasse in aes.hpp hinzugefügt
- Dtc Klasse in ppm.hpp mit participantChanged Signal
- AesType Enum: alle 15 At* Werte definiert
- AesEffectState_def: EsReceived hinzugefügt
- DataModification Enum: eAdded/eModified/eRemoved
- function_reply_object.h → core_types.h Include-Pfad (72 Dateien)
- Enum-Class-Streaming Template-Operator in INGLLogger.h
- ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen
- ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge
- QRegExp → QRegularExpression in tpm_js_parser.cpp
- .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert
- Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-19 06:06:24 +02:00
1 parent 010f91928a
commit b774f4035c
2785 files changed
+18754 -18316

No files matched your search

@@ -19,7 +19,6 @@ ConflictsDialog::ConflictsDialog(const QString &menuGroup, QWidget *parent)
, m_ui(new Ui::ConflictsDialog)
, m_sourceModel(nullptr)
, m_menuGroup(menuGroup)
, m_logger(getLogger("ConflictsDialog"))
{
m_ui->setupUi(this);
setOnlineHelpFilename(QStringLiteral("Ressourcen-Conflicts"));
@@ -55,7 +54,7 @@ bool ConflictsDialog::init(LtsSession::LtsSession *session,
if (m_scheduleId <= 0)
{
ERROR_LOG(m_logger) << "Invalid id for Instrumentation plan: " << m_scheduleId;
ERROR_LOG() << "Invalid id for Instrumentation plan: " << m_scheduleId;
return false;
}
@@ -65,7 +64,7 @@ bool ConflictsDialog::init(LtsSession::LtsSession *session,
if (!m_sourceModel->initModel(m_scheduleId, m_anotherScheduleId, m_dtc))
{
ERROR_LOG(m_logger) << "Could not init ConflictsDialogModel";
ERROR_LOG() << "Could not init ConflictsDialogModel";
delete m_sourceModel;
m_sourceModel = nullptr;
return false;
@@ -24,7 +24,6 @@ ConflictsDialogModel::ConflictsDialogModel(QObject *parent)
, m_dtc(nullptr)
, m_scheduleId(-1)
, m_anotherScheduleId(-1)
, m_logger(getLogger("OverviewConflictsDialogModel"))
{
}
@@ -129,7 +128,7 @@ bool ConflictsDialogModel::initModel(int scheduleId,
if (!(dtc->enableMainStructureElement() &&
dtc->enableMainSchedule()))
{
ERROR_LOG(m_logger) << "Could not enable Data Topics";
ERROR_LOG() << "Could not enable Data Topics";
return false;
}
@@ -303,7 +302,7 @@ void ConflictsDialogModel::initData()
if (mountingPoint.mountingPointState() == compareMountingPointState)
{
DEBUG_LOG(m_logger) << "No conflict for mounting point id = " << currentElement.id() << " - " << currentElement.name();
DEBUG_LOG() << "No conflict for mounting point id = " << currentElement.id() << " - " << currentElement.name();
continue;
}
@@ -315,11 +314,11 @@ void ConflictsDialogModel::initData()
mpData.conflictState = compareMountingPointState;
mpData.mpType = currentElement.mountingPointTypeId();
DEBUG_LOG(m_logger) << "## MP Id = " << mpData.id;
DEBUG_LOG(m_logger) << "## MP Name = " << mpData.name;
DEBUG_LOG(m_logger) << "## Aim state = " << mpData.aimState;
DEBUG_LOG() << "## MP Id = " << mpData.id;
DEBUG_LOG() << "## MP Name = " << mpData.name;
DEBUG_LOG() << "## Aim state = " << mpData.aimState;
DEBUG_LOG(m_logger) << "Adding mounting point id = " << mpData.id << " - " << mpData.name;
DEBUG_LOG() << "Adding mounting point id = " << mpData.id << " - " << mpData.name;
item = new NGLTreeItem(QVariant::fromValue(mpData));
}
@@ -339,16 +338,16 @@ void ConflictsDialogModel::initData()
parentIndex = m_mountingPointIndexes.value(path.at(path.size() - 2), indexFromItem(m_rootItem));
if (!parentIndex.isValid())
{
DEBUG_LOG(m_logger) << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
DEBUG_LOG() << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
for (const StructureElement &se : mse.elements())
DEBUG_LOG(m_logger) << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
DEBUG_LOG() << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
}
}
else
{
parentIndex = groupIndex.isValid() ? groupIndex : indexFromItem(m_rootItem);
DEBUG_LOG(m_logger) << "Insert row under root: " << currentElement.displayName();
DEBUG_LOG() << "Insert row under root: " << currentElement.displayName();
}
insertRow(rowCount(parentIndex), parentIndex, item);
@@ -81,9 +81,6 @@ private:
QHash<int, QModelIndex> m_mountingPointIndexes;
QSet<int> m_availableBuildingGroups;
QList<MountingPointType> m_visibleTypes;
LOGGER_T m_logger;
};
@@ -25,9 +25,8 @@ OverviewDialog::OverviewDialog(const QString &menuGroup, LtsSession::LtsSession
, m_session(session)
, m_ui(new Ui::OverviewDialog)
, m_menuGroup(menuGroup)
, m_logger(getLogger("OverviewDialog"))
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
m_ui->setupUi(this);
m_timerUpdateView = new QTimer(this);
m_timerUpdateView->setSingleShot(true);
@@ -37,19 +36,19 @@ OverviewDialog::OverviewDialog(const QString &menuGroup, LtsSession::LtsSession
connect(m_ui->cbBasePlan, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OverviewDialog::onCbBasePlanIndexChanged);
setOnlineHelpFilename(QStringLiteral("Ressourcen-Overview"));
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
OverviewDialog::~OverviewDialog()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
delete m_ui;
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void OverviewDialog::aboutToClose()
{
DEBUG_LOG(m_logger) << "About to close";
DEBUG_LOG() << "About to close";
if (m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts")))
m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts"))->closeRequest();
}
@@ -70,7 +69,7 @@ bool OverviewDialog::init(int planId,
const std::shared_ptr<Interface::Ftc> &ftc,
const std::shared_ptr<ForeignDataInterface> &dataInterface)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
m_scheduleId = planId;
m_dtc = dtc;
m_ftc = ftc;
@@ -94,32 +93,32 @@ bool OverviewDialog::init(int planId,
connect(m_timerUpdateView, &QTimer::timeout, this, &OverviewDialog::reloadModel);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
return true;
}
void OverviewDialog::setCbBasePlan()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
m_ui->cbBasePlan->clear();
m_ui->cbBasePlan->addItem(tr("Actual Mountings"), 0);
m_ui->cbBasePlan->insertSeparator(1);
for (auto ms : m_dtc->mainSchedules())
m_ui->cbBasePlan->addItem(QString::fromStdString(ms.name()), ms.id());
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void OverviewDialog::setCbComparePlan()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
m_ui->cbComparePlan->clear();
m_ui->cbComparePlan->addItem(tr("All active(*) plans"),0);
m_ui->cbComparePlan->insertSeparator(1);
for (auto ms : m_dtc->mainSchedules())
m_ui->cbComparePlan->addItem((ms.statusId() == ScheduleStatus_def::Active ? QLatin1Literal("* ") : QLatin1Literal(" ")) +
QString::fromStdString(ms.name()), ms.id());
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void OverviewDialog::onPrint()
@@ -151,7 +150,7 @@ void OverviewDialog::onPrint()
void OverviewDialog::onScheduleIdChanged(int32_t scheduleId)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
if (m_scheduleId == scheduleId)
return;
setCbComparePlan();
@@ -164,30 +163,30 @@ void OverviewDialog::onScheduleIdChanged(int32_t scheduleId)
m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts"))->closeRequest();
retranslate();
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void OverviewDialog::onCbComparePlanIndexChanged(int index)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
Q_UNUSED(index);
updateOverviewData();
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void OverviewDialog::onCbBasePlanIndexChanged(int index)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
Q_UNUSED(index);
updateOverviewData();
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void OverviewDialog::onPlansDataChanged()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
updateOverviewData();
ConflictsDialog *dialog = static_cast<ConflictsDialog*>(m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts")));
if (dialog)
@@ -195,7 +194,7 @@ void OverviewDialog::onPlansDataChanged()
dialog->updateModel();
}
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
void OverviewDialog::updateOverviewData()
@@ -205,7 +204,7 @@ void OverviewDialog::updateOverviewData()
void OverviewDialog::reloadModel()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
if (m_model == nullptr)
return;
@@ -218,7 +217,7 @@ void OverviewDialog::reloadModel()
if (m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts")))
m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts"))->closeRequest();
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
}
@@ -30,9 +30,8 @@ OverviewDialogModel::OverviewDialogModel(QObject *parent)
, m_loadedScheduleId(-1)
, m_comparedScheduleId(0)
, m_dtc(nullptr)
, m_logger(getLogger("OverviewDialogModel"))
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
@@ -54,7 +53,7 @@ OverviewDialogModel::OverviewDialogModel(QObject *parent)
m_refMap[MountingPointType_def::IndoorCamera] = 2;
m_refMap[MountingPointType_def::IndoorIPS] = 3;
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
QVariant OverviewDialogModel::data(const QModelIndex &index, int role) const
@@ -114,7 +113,7 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
const std::shared_ptr<Interface::Dtc> &dtc,
int32_t comparedScheduleId, int32_t basePlanId)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
m_dtc = dtc;
m_loadedScheduleId = mainScheduleId;
m_comparedScheduleId = comparedScheduleId;
@@ -125,19 +124,19 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
if (!m_dtc->mainSchedules().contains(m_loadedScheduleId))
{
m_loadedScheduleId = -1;
ERROR_LOG(m_logger) << "Invalid scheduleId = " << mainScheduleId;
ERROR_LOG() << "Invalid scheduleId = " << mainScheduleId;
return false;
}
DEBUG_LOG(m_logger) << "[INITIAL] loaded: "<<m_loadedScheduleId<<" cmp: "<<m_comparedScheduleId<<" sim: "<<m_basePlanId;
DEBUG_LOG() << "[INITIAL] loaded: "<<m_loadedScheduleId<<" cmp: "<<m_comparedScheduleId<<" sim: "<<m_basePlanId;
if (!initData())
{
ERROR_LOG(m_logger) << "Could not init data";
ERROR_LOG() << "Could not init data";
return false;
}
DEBUG_LOG(m_logger) << "initModel successful";
DEBUG_LOG() << "initModel successful";
connect(m_dtc.get(), &Interface::Dtc::mainStructureElementChanged,
@@ -147,13 +146,13 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
connect(m_dtc.get(), &Interface::Dtc::instrumentationAssetChanged,
this, &OverviewDialogModel::initData, Qt::UniqueConnection);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
return true;
}
bool OverviewDialogModel::initData()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
#ifdef BENCHMARK
QElapsedTimer elapsedTimer1;
@@ -174,9 +173,9 @@ bool OverviewDialogModel::initData()
setNewData();
for ( int mppId : std::as_const(m_conflictedStructureElementIds))
DEBUG_LOG(m_logger) << "Conflicted structure element id = " << mppId;
DEBUG_LOG() << "Conflicted structure element id = " << mppId;
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
return true;
}
@@ -214,7 +213,7 @@ bool OverviewDialogModel::hasConflictedMountingPoints()
QHash<int, MountingPointPlan> OverviewDialogModel::mergePlans(const QHash<int, MountingPointPlan> &currPlan, const int cmpPlanId)
{
DEBUG_LOG(m_logger)<<"[MERGE PLANs] currPlanId: "<<m_loadedScheduleId<<" ; cmpPlanId: "<<cmpPlanId;
DEBUG_LOG()<<"[MERGE PLANs] currPlanId: "<<m_loadedScheduleId<<" ; cmpPlanId: "<<cmpPlanId;
QHash<int, MountingPointPlan> mergedPlan = currPlan;
const auto msConst = m_dtc->mainSchedules();
@@ -244,7 +243,7 @@ QHash<int, MountingPointPlan> OverviewDialogModel::mergePlans(const QHash<int, M
if ((basePlanMpp.mountingPointState() == MountingPointState::Equipped && currentMpp.mountingPointState() == MountingPointState::Empty) ||
(basePlanMpp.mountingPointState() == MountingPointState::Empty && currentMpp.mountingPointState() == MountingPointState::Equipped))
{
DEBUG_LOG(m_logger)<<" conflicted name: "<<currentMpp.structureElementId();
DEBUG_LOG()<<" conflicted name: "<<currentMpp.structureElementId();
mergedPlan[currentMpp.structureElementId()].mountingPointState(MountingPointState::Idle);
m_conflictedStructureElementIds.insert(basePlanMpp.structureElementId());
}
@@ -280,7 +279,7 @@ void OverviewDialogModel::setNewData()
QHash<int , MountingPointPlan> baseMountingPointPlans;
DEBUG_LOG(m_logger) << "We compare plan " << m_basePlanId << " with " << m_comparedScheduleId;
DEBUG_LOG() << "We compare plan " << m_basePlanId << " with " << m_comparedScheduleId;
baseMountingPointPlans.clear();
m_conflictedStructureElementIds.clear();
@@ -92,9 +92,6 @@ private:
QMap<qint32, InfrastructureManagement::MountingPointAsset> m_mountingPointAssets;
QMap<MountingPointType, int> m_refMap;
LOGGER_T m_logger;
};
}
@@ -23,12 +23,11 @@ OverviewMountingPointListDialog::OverviewMountingPointListDialog(const QString &
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly)
, m_menuGroup(menuGroup)
, m_ui(new Ui::OverViewMountingPointListDialog)
, m_logger(getLogger("OverviewMountingPointListDialog"))
, m_actionMenu(new QMenu(this))
, m_printMountingAction(new QAction(tr("To Mount"), this))
, m_printUnmountingAction(new QAction(tr("To Unmount"), this))
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
setAttribute(Qt::WA_DeleteOnClose);
m_ui->setupUi(this);
@@ -40,14 +39,14 @@ OverviewMountingPointListDialog::OverviewMountingPointListDialog(const QString &
connect(m_actionMenu, &QMenu::triggered, this, &OverviewMountingPointListDialog::onPrint);
m_buttonBox->setMenu(LtsWidgets::DialogButton::Print, m_actionMenu);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
OverviewMountingPointListDialog::~OverviewMountingPointListDialog()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
delete m_ui;
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
@@ -58,7 +57,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
const std::shared_ptr<ForeignDataInterface> &dataInterface,
int32_t scheduleId)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START, scheduleId=" << scheduleId;
TRACE_LOG() << Q_FUNC_INFO << " START, scheduleId=" << scheduleId;
m_dtc = dtc;
m_dataIfc = dataInterface;
m_session = session;
@@ -69,30 +68,30 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
if (!m_ftc->enableInstrumentationAssetModify())
{
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetModify of ISM";
ERROR_LOG() << "Could not enable FT InstrumentationAssetModify of ISM";
return false;
}
if (!m_ftc->enableMountingPointPlanModify())
{
ERROR_LOG(m_logger) << "Could not enable FT enableMountingPointPlansModify of ISM";
ERROR_LOG() << "Could not enable FT enableMountingPointPlansModify of ISM";
return false;
}
DEBUG_LOG(m_logger) << LOGFUNCTION << " new ViewMountingPointListModel...";
DEBUG_LOG() << Q_FUNC_INFO << " new ViewMountingPointListModel...";
delete m_sourceModel;
m_sourceModel = new ViewMountingPointListModel(this);
if (!m_sourceModel->initModel(m_dtc, m_dataIfc, m_scheduleId))
{
ERROR_LOG(m_logger) << "Could not init model";
ERROR_LOG() << "Could not init model";
delete m_sourceModel;
m_sourceModel = nullptr;
return false;
}
DEBUG_LOG(m_logger) << LOGFUNCTION << " new m_mountedPointSortProxyModel ...";
DEBUG_LOG() << Q_FUNC_INFO << " new m_mountedPointSortProxyModel ...";
delete m_mountedPointSortProxyModel;
m_mountedPointSortProxyModel = new ViewMountingPointListSortModel(this);
m_mountedPointSortProxyModel->setVisibleState(MountingPointState::Equipped);
@@ -104,7 +103,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
m_ui->mountingPointListView->setSortingEnabled(true);
DEBUG_LOG(m_logger) << LOGFUNCTION << " new m_unmountedPointSortProxyModel ...";
DEBUG_LOG() << Q_FUNC_INFO << " new m_unmountedPointSortProxyModel ...";
delete m_unmountedPointSortProxyModel;
m_unmountedPointSortProxyModel = new ViewMountingPointListSortModel(this);
m_unmountedPointSortProxyModel->setVisibleState(MountingPointState::Empty);
@@ -134,7 +133,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
DEBUG_LOG(m_logger) << LOGFUNCTION << " filter... ...";
DEBUG_LOG() << Q_FUNC_INFO << " filter... ...";
const auto filters = { MountingPointType::BuildingSensorModule,
@@ -216,7 +215,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
retranslate();
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
return true;
}
@@ -26,14 +26,13 @@ ViewMountingPointListModel::ViewMountingPointListModel(QObject *parent)
: NGLTreeModel(parent, new NGLTreeItem(QVariant()), { tr("Name"), tr("Type"), tr("Aim State") })
, m_visRoot(new NGLTreeItem(tr("Mounting Points")))
, m_dtc(nullptr)
, m_logger(getLogger("ViewMountingPointListModel"))
, m_dataChangedTimer(new QTimer(this))
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
m_dataChangedTimer->setSingleShot(true);
m_dataChangedTimer->setInterval(100);
connect(m_dataChangedTimer, &QTimer::timeout, this, &ViewMountingPointListModel::emitDataChanged);
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
@@ -106,7 +105,7 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
const std::shared_ptr<ForeignDataInterface> &dataInterface,
int32_t requestedScheduleId)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START, scheduleId=" << requestedScheduleId;
TRACE_LOG() << Q_FUNC_INFO << " START, scheduleId=" << requestedScheduleId;
if (m_dtc == dtc)
return true;
@@ -114,7 +113,7 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
if (!(dtc->enableMainStructureElement() &&
dtc->enableMountingPointAsset()))
{
ERROR_LOG(m_logger) << "Could not enable Datatopics";
ERROR_LOG() << "Could not enable Datatopics";
return false;
}
m_dtc = dtc;
@@ -133,11 +132,11 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
connect(m_dataInterface.get(), &ForeignDataInterface::mountingPointChanged,
this, &ViewMountingPointListModel::onMountingPointChanged);
DEBUG_LOG(m_logger) << "initModel successful";
DEBUG_LOG() << "initModel successful";
initData();
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
return true;
}
@@ -178,7 +177,7 @@ inline int getFakeBuildingGroupId(int seId)
void ViewMountingPointListModel::initData()
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START, m_scheduleId=" << m_scheduleId;
TRACE_LOG() << Q_FUNC_INFO << " START, m_scheduleId=" << m_scheduleId;
#ifdef BENCHMARK
@@ -312,9 +311,9 @@ void ViewMountingPointListModel::initData()
parentIndex = m_mountingPointIndexes.value(path.at(path.size() - 2), indexFromItem(m_visRoot));
if (!parentIndex.isValid())
{
ERROR_LOG(m_logger) << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
ERROR_LOG() << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
for (const StructureElement &se : mse.elements())
ERROR_LOG(m_logger) << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
ERROR_LOG() << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
}
}
else
@@ -346,18 +345,18 @@ void ViewMountingPointListModel::initData()
qCritical() << " ViewMountingPointListModel::initData-BENCHMARK: m_scheduleId=" << m_scheduleId << " took " << elapsedTimer1.elapsed() << " [ms]";
#endif
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
}
bool ViewMountingPointListModel::mountingPointHasAssetMounted(int32_t mountingPointId, const QMap<qint32, MountingPointAsset> &mountingPointAssetMap)
{
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
TRACE_LOG() << Q_FUNC_INFO << " START";
for (const MountingPointAsset &mpa : mountingPointAssetMap)
{
if (mpa.structureElementId() == mountingPointId)
return true;
}
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
TRACE_LOG() << Q_FUNC_INFO << " END";
return false;
}
@@ -109,7 +109,6 @@ private:
QHash<int32_t, bool> m_mountingPointHasAssetMounted;
QSet<int> m_availableFloors;
LOGGER_T m_logger;
QTimer *m_dataChangedTimer{nullptr};
};