Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_asset_list_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_ism_asset_list_dialog.h"
|
||||
#include "ism_asset_list_dialog_model.h"
|
||||
#include <InfrastructureManagement/ism_operator_rights.h>
|
||||
@@ -543,7 +544,7 @@ void AssetListDialog::onSetStateButtonClicked()
|
||||
|
||||
std::vector<InstrumentationAsset> assets;
|
||||
assets.reserve(indexList.size());
|
||||
for(QModelIndex index: qAsConst(indexList))
|
||||
for(QModelIndex index: std::as_const(indexList))
|
||||
{
|
||||
InstrumentationAsset asset = m_model->assetByIndex(index);
|
||||
assets.push_back(asset);
|
||||
@@ -769,7 +770,7 @@ void AssetListDialog::onReachabilityUpdateAction()
|
||||
const QModelIndexList &mil = m_ui->assetListView->selectedRows();
|
||||
QIcon icon;
|
||||
QString str;
|
||||
for (const QModelIndex &il : qAsConst(mil))
|
||||
for (const QModelIndex &il : std::as_const(mil))
|
||||
{
|
||||
const InstrumentationAsset ia = m_model->getRowData(il.row());
|
||||
|
||||
@@ -793,13 +794,13 @@ void AssetListDialog::onHostsForUpdateNotifyTimeout()
|
||||
if (m_hostsForUpdate.isEmpty())
|
||||
return;
|
||||
|
||||
for (auto item : qAsConst(m_hostsForUpdate))
|
||||
for (auto item : std::as_const(m_hostsForUpdate))
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " host = " << item;
|
||||
|
||||
|
||||
std::vector<std::string> hostnameStd;
|
||||
hostnameStd.reserve(m_hostsForUpdate.size());
|
||||
for (const QString &item : qAsConst(m_hostsForUpdate))
|
||||
for (const QString &item : std::as_const(m_hostsForUpdate))
|
||||
if( std::find(hostnameStd.begin(), hostnameStd.end(), item.toStdString()) == hostnameStd.end())
|
||||
hostnameStd.push_back(item.toStdString());
|
||||
|
||||
|
||||
+4
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_asset_list_dialog_model.h"
|
||||
#include <utility>
|
||||
#include <InfrastructureManagement/ism_translation.h>
|
||||
#include <InfrastructureManagement/Shared/ism_mounting_point.h>
|
||||
#include <ComponentMonitor/cmo_data_plugin_interface.h>
|
||||
@@ -434,10 +435,10 @@ void AssetListDialogModel::updateFilterTypes()
|
||||
LtsWidgets::ComboboxFilterContent cfc;
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
QSet<InfrastructureManagement::MountingPointType> types;
|
||||
for (const auto &r : qAsConst(m_vecData))
|
||||
for (const auto &r : std::as_const(m_vecData))
|
||||
types.insert(r.mountingPointTypeId());
|
||||
|
||||
for (const auto es : qAsConst(types))
|
||||
for (const auto es : std::as_const(types))
|
||||
{
|
||||
if(es == MountingPointType::MeteoDataUnit ||
|
||||
es == MountingPointType::BuildingControlUnit
|
||||
@@ -459,7 +460,7 @@ void AssetListDialogModel::updateFilterReachability()
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
|
||||
QMap<QString, QIcon> values;
|
||||
for (const auto &item : qAsConst(m_vecData))
|
||||
for (const auto &item : std::as_const(m_vecData))
|
||||
{
|
||||
QIcon icon;
|
||||
QString str;
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_edit_asset_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_ism_edit_asset_dialog.h"
|
||||
#include "ism_set_properties_dialog.h"
|
||||
#include <InfrastructureManagement/ism_translation.h>
|
||||
@@ -74,7 +75,7 @@ bool EditAssetDialog::apply(const InstrumentationAssetState newState)
|
||||
{
|
||||
InstrumentationAssetSetStateRequest req;
|
||||
|
||||
for(const auto &asset : qAsConst(m_asset))
|
||||
for(const auto &asset : std::as_const(m_asset))
|
||||
{
|
||||
if (asset.id() == -1)
|
||||
{
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_filter_asset_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_ism_filter_asset_dialog.h"
|
||||
#include <InfrastructureManagement/ism_translation.h>
|
||||
#include <InfrastructureManagement/Shared/ism_mounting_point.h>
|
||||
@@ -57,7 +58,7 @@ void AssetFilterDialog::fillAssetComboBoxes()
|
||||
types += m_model->getRowData(i).mountingPointTypeId();
|
||||
|
||||
m_ui->cmbType->addItem(QLatin1String("---"));
|
||||
for (const auto &type : qAsConst(types))
|
||||
for (const auto &type : std::as_const(types))
|
||||
m_ui->cmbType->addItem(InfrastructureManagement::toString(type), type.underlying());
|
||||
m_ui->cmbType->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ NGL_TARGET_LINK_LIBRARIES(IsmResGuiPlugin
|
||||
IsmResGuiPluginInterface
|
||||
IsmDataPluginInterface
|
||||
IsmShared
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
LtsDataView
|
||||
LtsUtilsCore # json
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_exercise_assignment_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_ism_exercise_assignment_dialog.h"
|
||||
#include "ism_exercise_assignment_dialog_requesters.h"
|
||||
#include "ism_exercise_assignment_dialog_proxy_model.h"
|
||||
@@ -77,7 +78,7 @@ ExerciseAssignmentDialog::ExerciseAssignmentDialog(LtsSession::LtsSession *sessi
|
||||
}
|
||||
});
|
||||
|
||||
for (const auto &exercise : qAsConst(m_exercises))
|
||||
for (const auto &exercise : std::as_const(m_exercises))
|
||||
m_ui->cbExercises->addItem(QString::fromStdString(exercise.name()), exercise.id());
|
||||
|
||||
|
||||
@@ -228,7 +229,7 @@ bool ExerciseAssignmentDialog::apply()
|
||||
}
|
||||
|
||||
const QVector<RequestInfos> &requestInfos = m_model->getRequestInfos();
|
||||
for (const RequestInfos &ri : qAsConst(requestInfos))
|
||||
for (const RequestInfos &ri : std::as_const(requestInfos))
|
||||
{
|
||||
MainStructureElementModifyRequest request;
|
||||
MainStructureElement &mse = request;
|
||||
|
||||
+6
-5
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_exercise_assignment_dialog_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QFont>
|
||||
#include <QGuiApplication>
|
||||
@@ -35,7 +36,7 @@ ExerciseAssignmentDialogModel::~ExerciseAssignmentDialogModel()
|
||||
void ExerciseAssignmentDialogModel::addMse(int mseId, int sectionId, const QString &displayName, int exerciseId)
|
||||
{
|
||||
const QList<TreeItem*> &childItems = m_rootItem->childItems();
|
||||
for (auto sectionItem : qAsConst(childItems))
|
||||
for (auto sectionItem : std::as_const(childItems))
|
||||
{
|
||||
if (sectionItem->sectionId() == sectionId)
|
||||
{
|
||||
@@ -193,7 +194,7 @@ QSet<int> ExerciseAssignmentDialogModel::childMses(const QModelIndex &mi, int ex
|
||||
{
|
||||
QSet<int> mses;
|
||||
const QList<TreeItem*> &childItems = treeItem(mi)->childItems();
|
||||
for(auto myChild : qAsConst(childItems))
|
||||
for(auto myChild : std::as_const(childItems))
|
||||
{
|
||||
if (myChild->exerciseId() == exerciseId)
|
||||
mses << myChild->mseId();
|
||||
@@ -212,10 +213,10 @@ QModelIndex ExerciseAssignmentDialogModel::findItemByMseId(int mseId) const
|
||||
|
||||
|
||||
const QList<TreeItem*> &childItems = m_rootItem->childItems();
|
||||
for (auto sectionItem : qAsConst(childItems))
|
||||
for (auto sectionItem : std::as_const(childItems))
|
||||
{
|
||||
const QList<TreeItem*> §ionChildItems= sectionItem->childItems();
|
||||
for (auto mseItem : qAsConst(sectionChildItems))
|
||||
for (auto mseItem : std::as_const(sectionChildItems))
|
||||
{
|
||||
if (mseItem->mseId() == mseId)
|
||||
return index(mseItem);
|
||||
@@ -293,7 +294,7 @@ void TreeItem::removeChild(int id)
|
||||
void TreeItem::getAllUnderlyingRequestInfos(QVector<RequestInfos> &requestInfos, bool all) const
|
||||
{
|
||||
const QList<TreeItem*> &childItemsRef = childItems();
|
||||
for (auto myChild : qAsConst(childItemsRef))
|
||||
for (auto myChild : std::as_const(childItemsRef))
|
||||
{
|
||||
if (all || (myChild->exerciseId() != myChild->originalExerciseId()))
|
||||
requestInfos.append({myChild->mseId(), myChild->exerciseId()});
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_exercise_assignment_dialog_proxy_model.h"
|
||||
#include <utility>
|
||||
#include "ism_exercise_assignment_dialog_model.h"
|
||||
|
||||
#include <QMimeData>
|
||||
@@ -62,7 +63,7 @@ QMimeData *ExerciseAssignmentDialogModelFilterProxy::mimeData(const QModelIndexL
|
||||
if (mseId <= 0)
|
||||
{
|
||||
const QSet<int> childMses = m_sourceModel->childMses(miSource, m_exerciseId);
|
||||
for (int mse : qAsConst(childMses))
|
||||
for (int mse : std::as_const(childMses))
|
||||
mseIds << mse;
|
||||
}
|
||||
else
|
||||
@@ -97,7 +98,7 @@ bool ExerciseAssignmentDialogModelFilterProxy::dropMimeData(const QMimeData *dat
|
||||
QSet<QModelIndex> setToExpand;
|
||||
|
||||
const QVector<int> &eamsVec = eams.toVector<int>();
|
||||
for (int mseId : qAsConst(eamsVec))
|
||||
for (int mseId : std::as_const(eamsVec))
|
||||
{
|
||||
QModelIndex sourceMi = m_sourceModel->findItemByMseId(mseId);
|
||||
setToExpand.insert(sourceMi.parent());
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_mounting_point_info_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_ism_mounting_point_info_dialog.h"
|
||||
|
||||
#include <InfrastructureManagement/ism_translation.h>
|
||||
@@ -313,7 +314,7 @@ void MountingPointInfoDialog::removeAsset()
|
||||
m_assetId = -1;
|
||||
m_ui->gbxAsset->hide();
|
||||
|
||||
for (QLabel *lbl : qAsConst(m_dynamicAssetPropLabels))
|
||||
for (QLabel *lbl : std::as_const(m_dynamicAssetPropLabels))
|
||||
m_ui->gbxAsset->layout()->removeWidget(lbl);
|
||||
|
||||
qDeleteAll(m_dynamicAssetPropLabels);
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_mounting_point_list_dialog_model.h"
|
||||
#include <utility>
|
||||
#include "ism_mounting_point_list_dialog_list_sort_model.h"
|
||||
|
||||
#include <InfrastructureManagement/ism_translation.h>
|
||||
@@ -366,7 +367,7 @@ bool MountingPointListDialogModel::setData(const QModelIndex &index, const QVari
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const QModelIndex &idx : qAsConst(m_mountingPointIndexes))
|
||||
for (const QModelIndex &idx : std::as_const(m_mountingPointIndexes))
|
||||
lambda(idx);
|
||||
}
|
||||
|
||||
@@ -390,7 +391,7 @@ void MountingPointListDialogModel::setMntPointFilterTypes(QSet<MountingPointType
|
||||
{
|
||||
LtsWidgets::ComboboxFilterContent cfc;
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
for (const auto es : qAsConst(types))
|
||||
for (const auto es : std::as_const(types))
|
||||
{
|
||||
if (es == MountingPointType::OutdoorIPS)
|
||||
continue;
|
||||
|
||||
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_overview_dialog_model.h"
|
||||
#include <utility>
|
||||
#include <InfrastructureManagement/Shared/ism_mounting_point.h>
|
||||
#include <InfrastructureManagement/ism_translation.h>
|
||||
|
||||
@@ -172,7 +173,7 @@ bool OverviewDialogModel::initData()
|
||||
|
||||
setNewData();
|
||||
|
||||
for ( int mppId : qAsConst(m_conflictedStructureElementIds))
|
||||
for ( int mppId : std::as_const(m_conflictedStructureElementIds))
|
||||
DEBUG_LOG(m_logger) << "Conflicted structure element id = " << mppId;
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
@@ -196,7 +197,7 @@ MountingPointType OverviewDialogModel::getMountingPointTypeId(int structureEleme
|
||||
|
||||
bool OverviewDialogModel::hasMountedAsset(int seId)
|
||||
{
|
||||
for (const InfrastructureManagement::MountingPointAsset &asset : qAsConst(m_mountingPointAssets))
|
||||
for (const InfrastructureManagement::MountingPointAsset &asset : std::as_const(m_mountingPointAssets))
|
||||
{
|
||||
if (asset.structureElementId() == seId)
|
||||
return true;
|
||||
@@ -285,7 +286,7 @@ void OverviewDialogModel::setNewData()
|
||||
m_conflictedStructureElementIds.clear();
|
||||
|
||||
|
||||
for (int id : qAsConst(m_refMap))
|
||||
for (int id : std::as_const(m_refMap))
|
||||
{
|
||||
m_vecData[id] = RowData(m_vecData[id].mpt);
|
||||
|
||||
@@ -418,7 +419,7 @@ void OverviewDialogModel::setNewData()
|
||||
|
||||
|
||||
|
||||
for (auto id : qAsConst(m_refMap))
|
||||
for (auto id : std::as_const(m_refMap))
|
||||
{
|
||||
auto &rowData = m_vecData[id];
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_overview_mounting_point_list_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <InfrastructureManagement/ism_translation.h>
|
||||
|
||||
@@ -206,7 +207,7 @@ void ViewMountingPointListModel::initData()
|
||||
{
|
||||
|
||||
const InfrastructureManagement::MainSchedule ¤tSchedule = m_dtc->mainSchedule(m_scheduleId);
|
||||
for (const MountingPointPlan &mpp : qAsConst(currentSchedule.elements()))
|
||||
for (const MountingPointPlan &mpp : std::as_const(currentSchedule.elements()))
|
||||
mountingPointPlanCont.insert(mpp.structureElementId(), mpp);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_schedule_differences_list_model.h"
|
||||
#include <utility>
|
||||
#include <InfrastructureManagement/ism_translation.h>
|
||||
#include <InfrastructureManagement/Shared/ism_mounting_point.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
@@ -90,7 +91,7 @@ bool ScheduleDifferencesListDialogModel::initModel(int scheduleId,
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const MountingPointPlan &mpp : qAsConst(diff))
|
||||
for (const MountingPointPlan &mpp : std::as_const(diff))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Adding to model MPP = " << mpp.id();
|
||||
insertRow(mpp);
|
||||
|
||||
+4
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_plan_tln_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_ism_plan_tln_dialog.h"
|
||||
#include "ism_plan_dialog.h"
|
||||
#include "ism_plan_tln_delegate.h"
|
||||
@@ -180,10 +181,10 @@ void PlanTimeLineDialog::onRemove()
|
||||
|
||||
InstrumentationAssetModifyRequest req;
|
||||
InstrumentationAsset asset;
|
||||
for (const auto &element : qAsConst(item.elements()))
|
||||
for (const auto &element : std::as_const(item.elements()))
|
||||
{
|
||||
QMap<qint32, MountingPointAsset> mntPntAssets = m_dtc->mountingPointAssets();
|
||||
for (const auto &mntPntAsset : qAsConst(mntPntAssets))
|
||||
for (const auto &mntPntAsset : std::as_const(mntPntAssets))
|
||||
{
|
||||
if (mntPntAsset.structureElementId() == element.structureElementId())
|
||||
{
|
||||
@@ -225,7 +226,7 @@ void PlanTimeLineDialog::onApply()
|
||||
return;
|
||||
}
|
||||
QVector<int> itemIds = m_ui->timeline->timelineModel()->itemIds();
|
||||
for (auto itemId : qAsConst(itemIds))
|
||||
for (auto itemId : std::as_const(itemIds))
|
||||
{
|
||||
int seId = m_model->getScheduleIdOfItem(itemId);
|
||||
if (seId == -1)
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_plan_tln_model.h"
|
||||
#include <utility>
|
||||
#include <LtsWidgets/lts_message_dialog.h>
|
||||
#include <QDateTime>
|
||||
|
||||
@@ -74,7 +75,7 @@ bool PlanTimelineModel::setModel()
|
||||
m_endTime = QDateTime::currentMSecsSinceEpoch() + (LtsTimeline::ZoomFactor::OneDay);
|
||||
m_duration = m_endTime - m_startTime;
|
||||
|
||||
for (auto scheduleId : qAsConst(scheduleIds))
|
||||
for (auto scheduleId : std::as_const(scheduleIds))
|
||||
{
|
||||
MainSchedule mse = m_dtc->mainSchedule(scheduleId);
|
||||
|
||||
@@ -144,7 +145,7 @@ QVector<PlanTimelineModel::ItemIntersection> PlanTimelineModel::getIntersectedPl
|
||||
int32_t PlanTimelineModel::getScheduleIdOfItem(int itemId)
|
||||
{
|
||||
int32_t scheduleId = -1;
|
||||
for (auto item : qAsConst(m_itemIntersection))
|
||||
for (auto item : std::as_const(m_itemIntersection))
|
||||
{
|
||||
if (item.itemId == itemId)
|
||||
{
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_building_mount_point_model.h"
|
||||
#include <utility>
|
||||
#include <QDataStream>
|
||||
#include <QVector>
|
||||
#include <nglwidgets/ngltreeitem.h>
|
||||
@@ -608,7 +609,7 @@ MainStructureElement BuildingMountPointModel::getMainStructureElement(const QMod
|
||||
bool hasNewMountingPoints = false;
|
||||
QHash<MountingPointType, int> maxIds;
|
||||
QSet<int> setIds;
|
||||
for (const StructureElement &se : qAsConst(children))
|
||||
for (const StructureElement &se : std::as_const(children))
|
||||
{
|
||||
setIds.insert(se.id());
|
||||
auto &ref = maxIds[se.mountingPointTypeId()];
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_plan_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_ism_plan_dialog.h"
|
||||
#include "ism_plan_dialog_model.h"
|
||||
#include "ism_plan_edit_dialog.h"
|
||||
@@ -209,10 +210,10 @@ void PlanDialog::onRemove()
|
||||
InstrumentationAssetModifyRequest req;
|
||||
InstrumentationAsset asset;
|
||||
|
||||
for (const auto &element : qAsConst(item.elements()))
|
||||
for (const auto &element : std::as_const(item.elements()))
|
||||
{
|
||||
QMap<qint32, MountingPointAsset> mntPntAssets = m_dtc->mountingPointAssets();
|
||||
for (const auto &mntPntAsset : qAsConst(mntPntAssets))
|
||||
for (const auto &mntPntAsset : std::as_const(mntPntAssets))
|
||||
{
|
||||
if (mntPntAsset.structureElementId() == element.structureElementId())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user