Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
+2
-2
@@ -49,7 +49,7 @@ NGL_WRAP_UI(smo_monitors_gui_SRCS
|
||||
|
||||
NGL_ADD_LIBRARY(WS SmoMonitorsGuiPlugin MODULE ${smo_monitors_gui_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(SmoMonitorsGuiPlugin
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
AsbDataPluginInterface
|
||||
AsbHelper
|
||||
FlmDataPluginInterface
|
||||
@@ -96,7 +96,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(SmoCheckButtonHandler
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(SmoCheckButtonHandler
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsPrinting
|
||||
LtsSessionData
|
||||
LtsUtilsGuiDds
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "smo_base_player_model.h"
|
||||
#include <utility>
|
||||
#include "smo_bite_model.h"
|
||||
|
||||
#include <LtsSession/lts_session.h>
|
||||
@@ -442,7 +443,7 @@ void BasePlayerModel::updateUsedPartyIds()
|
||||
{
|
||||
m_usedPartyIds.clear();
|
||||
m_usedTypeIds.clear();
|
||||
for (const PlayerData &p : qAsConst(m_vecData))
|
||||
for (const PlayerData &p : std::as_const(m_vecData))
|
||||
{
|
||||
m_usedPartyIds[p.partyId] = p.partyId;
|
||||
m_usedTypeIds += p.typeId;
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "smo_check_button_handler.h"
|
||||
#include <utility>
|
||||
|
||||
#include <LtsUtilsSettings/settings.h>
|
||||
|
||||
@@ -298,7 +299,7 @@ void CheckButtonHandler::setMenueTactStateVisible(bool visi, bool hasSoldier, bo
|
||||
m_rearmWeapons->setVisible(visi);
|
||||
m_resetAndRearm->setVisible(visi);
|
||||
|
||||
for (auto *a : qAsConst(m_vbgs))
|
||||
for (auto *a : std::as_const(m_vbgs))
|
||||
a->setVisible(visi);
|
||||
|
||||
if (visi && hasSoldier)
|
||||
|
||||
+21
-20
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "smo_egcu_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <InfrastructureManagement/ism_translation.h>
|
||||
#include <Plugins/InfrastructureManagement/Shared/ism_mounting_point.h>
|
||||
@@ -161,9 +162,9 @@ QVariant EgcuModel::data(const QModelIndex &index, int role) const
|
||||
QString EgcuModel::getRoomsString(const EgcuData &data)
|
||||
{
|
||||
QStringList sl;
|
||||
for(int room : qAsConst(data.rooms))
|
||||
for(int room : std::as_const(data.rooms))
|
||||
{
|
||||
for (const auto &elem : qAsConst(data.mainStructureElement.elements()))
|
||||
for (const auto &elem : std::as_const(data.mainStructureElement.elements()))
|
||||
if (elem.mountingPointId() == room)
|
||||
{
|
||||
sl << QString::fromStdString(elem.displayName());
|
||||
@@ -372,7 +373,7 @@ bool EgcuModel::mseHasMountedAsset(const InfrastructureManagement::MainStructure
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "mseHasMountedBsm mse.id=" << mse.id()
|
||||
<< " name=" << mse.name();
|
||||
for (const InfrastructureManagement::StructureElement &element : qAsConst(mse.elements()))
|
||||
for (const InfrastructureManagement::StructureElement &element : std::as_const(mse.elements()))
|
||||
{
|
||||
|
||||
if (element.mountingPointTypeId() != mpType)
|
||||
@@ -389,7 +390,7 @@ bool EgcuModel::mseHasMountedAsset(const InfrastructureManagement::MainStructure
|
||||
bool EgcuModel::isMounted(int mountingPointId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "isMounted id=" << mountingPointId;
|
||||
for (const InfrastructureManagement::MountingPointAsset &asset : qAsConst(m_mountingPointAssets))
|
||||
for (const InfrastructureManagement::MountingPointAsset &asset : std::as_const(m_mountingPointAssets))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "assetId=" << asset.structureElementId()
|
||||
<< " mountingPointId=" << mountingPointId;
|
||||
@@ -416,7 +417,7 @@ void EgcuModel::initData()
|
||||
|
||||
|
||||
|
||||
for (const InfrastructureManagement::MainStructureElement &mse : qAsConst(mainStructEles))
|
||||
for (const InfrastructureManagement::MainStructureElement &mse : std::as_const(mainStructEles))
|
||||
{
|
||||
|
||||
if (mse.structureElementTypeId() != InfrastructureManagement::StructureElementType::Building)
|
||||
@@ -437,7 +438,7 @@ void EgcuModel::initData()
|
||||
if (parserError.error != QJsonParseError::NoError)
|
||||
continue;
|
||||
|
||||
for (const InfrastructureManagement::StructureElement ¤tElement : qAsConst(mse.elements()))
|
||||
for (const InfrastructureManagement::StructureElement ¤tElement : std::as_const(mse.elements()))
|
||||
{
|
||||
NGLTreeItem *item = nullptr;
|
||||
if (currentElement.structureElementTypeId() == InfrastructureManagement::StructureElementType::MountingPoint)
|
||||
@@ -710,7 +711,7 @@ void EgcuModel::getContextMenu(const QModelIndexList &indexes, QMenu &menu)
|
||||
QMap<int, InfrastructureManagement::StructureElement> &buildings = map.second;
|
||||
|
||||
menu.addAction(addContextMenuHeaderItem(tr("On")));
|
||||
for (const AssetManagement::RelayInfo &relayInfo : qAsConst(m_relayInfos))
|
||||
for (const AssetManagement::RelayInfo &relayInfo : std::as_const(m_relayInfos))
|
||||
{
|
||||
QAction *a = getRelayAction(InfrastructureManagement::EffectOverride_def::PermanentOn, egcus, relayInfo);
|
||||
if (a)
|
||||
@@ -718,7 +719,7 @@ void EgcuModel::getContextMenu(const QModelIndexList &indexes, QMenu &menu)
|
||||
}
|
||||
menu.addSeparator();
|
||||
menu.addAction(addContextMenuHeaderItem(tr("Off")));
|
||||
for (const AssetManagement::RelayInfo &relayInfo : qAsConst(m_relayInfos))
|
||||
for (const AssetManagement::RelayInfo &relayInfo : std::as_const(m_relayInfos))
|
||||
{
|
||||
QAction *a = getRelayAction(InfrastructureManagement::EffectOverride_def::PermanentOff, egcus, relayInfo);
|
||||
if (a)
|
||||
@@ -730,7 +731,7 @@ void EgcuModel::getContextMenu(const QModelIndexList &indexes, QMenu &menu)
|
||||
|
||||
menu.addSeparator();
|
||||
menu.addAction(addContextMenuHeaderItem(tr("Auto")));
|
||||
for (const AssetManagement::RelayInfo &relayInfo : qAsConst(m_relayInfos))
|
||||
for (const AssetManagement::RelayInfo &relayInfo : std::as_const(m_relayInfos))
|
||||
{
|
||||
QAction *a = getRelayAction(InfrastructureManagement::EffectOverride_def::Automatic, egcus, relayInfo);
|
||||
if (a)
|
||||
@@ -755,7 +756,7 @@ QAction* EgcuModel::getRelayAction(const InfrastructureManagement::EffectOverrid
|
||||
|
||||
QAction *action = new QAction(QString::fromStdString(relayInfo.name()), this);
|
||||
|
||||
for (const InfrastructureManagement::StructureElement &se : qAsConst(egcus))
|
||||
for (const InfrastructureManagement::StructureElement &se : std::as_const(egcus))
|
||||
{
|
||||
connect(action, &QAction::triggered, this, [this, se, eo, relayInfo](){
|
||||
auto copy = se;
|
||||
@@ -790,10 +791,10 @@ void EgcuModel::setAllOverrides(InfrastructureManagement::EffectOverride eo, con
|
||||
|
||||
QMap<int, InfrastructureManagement::StructureElementModifyRequest> requests;
|
||||
|
||||
for (const InfrastructureManagement::StructureElement &egcu : qAsConst(egcus))
|
||||
for (const InfrastructureManagement::StructureElement &egcu : std::as_const(egcus))
|
||||
{
|
||||
auto copy = egcu;
|
||||
for (const AssetManagement::RelayInfo &relayInfo : qAsConst(allowedRelays))
|
||||
for (const AssetManagement::RelayInfo &relayInfo : std::as_const(allowedRelays))
|
||||
udpatePropertiesForRelayOverride(relayInfo.id(), eo, copy);
|
||||
|
||||
if (!requests.contains(egcu.mainStructureElementId()))
|
||||
@@ -806,7 +807,7 @@ void EgcuModel::setAllOverrides(InfrastructureManagement::EffectOverride eo, con
|
||||
req.elements().at(req.elements().size() - 1) = copy;
|
||||
}
|
||||
|
||||
for (const InfrastructureManagement::StructureElement &building : qAsConst(buildings))
|
||||
for (const InfrastructureManagement::StructureElement &building : std::as_const(buildings))
|
||||
{
|
||||
auto copy = building;
|
||||
udpatePropertiesForOverride(QLatin1String("flash"), eo == InfrastructureManagement::EffectOverride_def::PermanentOn ? InfrastructureManagement::EffectOverride_def::Automatic : eo, copy);
|
||||
@@ -821,7 +822,7 @@ void EgcuModel::setAllOverrides(InfrastructureManagement::EffectOverride eo, con
|
||||
req.elements().at(req.elements().size() - 1) = copy;
|
||||
}
|
||||
|
||||
for (const auto &req : qAsConst(requests))
|
||||
for (const auto &req : std::as_const(requests))
|
||||
{
|
||||
m_requestHelper->addRequest([req, this]()
|
||||
{
|
||||
@@ -843,7 +844,7 @@ QAction* EgcuModel::getCenterAction(const int mseId)
|
||||
QAction* EgcuModel::getGenericAction(const InfrastructureManagement::EffectOverride eo, const QString &actionName, const QString &tagName, const QMap<int, InfrastructureManagement::StructureElement> &structureElements)
|
||||
{
|
||||
QAction *flashAutoAction = new QAction(actionName, this);
|
||||
for (const InfrastructureManagement::StructureElement &se : qAsConst(structureElements))
|
||||
for (const InfrastructureManagement::StructureElement &se : std::as_const(structureElements))
|
||||
{
|
||||
connect(flashAutoAction, &QAction::triggered, this, [this, se, tagName, eo](){
|
||||
auto copy = se;
|
||||
@@ -1022,7 +1023,7 @@ void EgcuModel::onInstrumentationAssetChanged(const InfrastructureManagement::In
|
||||
|
||||
QSet<NGLTreeItem*> egcus;
|
||||
findEgcuChildren(m_rootItem, egcus);
|
||||
for (const auto &egcu : qAsConst(egcus))
|
||||
for (const auto &egcu : std::as_const(egcus))
|
||||
{
|
||||
EgcuData mpData = egcu->data().value<EgcuData>();
|
||||
|
||||
@@ -1048,7 +1049,7 @@ void EgcuModel::onMainStructureElementChanged(const InfrastructureManagement::Ma
|
||||
|
||||
QSet<NGLTreeItem*> egcus;
|
||||
findEgcuChildren(buildingSe, egcus);
|
||||
for (const auto &egcu : qAsConst(egcus))
|
||||
for (const auto &egcu : std::as_const(egcus))
|
||||
{
|
||||
EgcuData mpData = egcu->data().value<EgcuData>();
|
||||
mpData.update(mainStructureElement);
|
||||
@@ -1068,9 +1069,9 @@ void EgcuModel::onMainStructureElementChanged(const InfrastructureManagement::Ma
|
||||
|
||||
QSet<NGLTreeItem*> structureElements;
|
||||
findStructureElementChildren(buildingSe, structureElements);
|
||||
for (const auto &item : qAsConst(structureElements))
|
||||
for (const auto &item : std::as_const(structureElements))
|
||||
{
|
||||
for (const auto &se : qAsConst(mainStructureElement.elements()))
|
||||
for (const auto &se : std::as_const(mainStructureElement.elements()))
|
||||
{
|
||||
int oldId = item->data().value<InfrastructureManagement::StructureElement>().id();
|
||||
if (oldId != se.id())
|
||||
@@ -1365,7 +1366,7 @@ void EgcuData::update(const InfrastructureManagement::StructureElement &se, cons
|
||||
if (effectOverrides.contains(relayId))
|
||||
effectOverrides[relayId] = static_cast<InfrastructureManagement::EffectOverride::inner_enum>(value);
|
||||
}
|
||||
for (auto relayId : qAsConst(allRelayIds))
|
||||
for (auto relayId : std::as_const(allRelayIds))
|
||||
effectOverrides[relayId] = InfrastructureManagement::EffectOverride_def::Automatic;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "smo_party_player_model.h"
|
||||
#include <utility>
|
||||
|
||||
namespace ServiceMonitor
|
||||
{
|
||||
@@ -20,7 +21,7 @@ bool PartyPlayerModel::initModel(LtsSession::LtsSessionDataDds *session)
|
||||
QVector<PlayerData> playerData;
|
||||
playerData.reserve(m_participants.size());
|
||||
const auto dynPartData = m_ppmDtc->dynamicParticipantDatas();
|
||||
for (const ParticipantManagement::Participant &part : qAsConst(m_participants))
|
||||
for (const ParticipantManagement::Participant &part : std::as_const(m_participants))
|
||||
{
|
||||
if (!part.equipmentNumber().is_set())
|
||||
continue;
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "smo_single_player_model.h"
|
||||
#include <utility>
|
||||
|
||||
namespace ServiceMonitor
|
||||
{
|
||||
@@ -66,7 +67,7 @@ void SinglePlayerModel::loadData(const QVector<int> &idList)
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int equipNo : qAsConst(equipNos))
|
||||
for (int equipNo : std::as_const(equipNos))
|
||||
{
|
||||
ParticipantManagement::Participant p;
|
||||
p.id(equipNo);
|
||||
|
||||
Reference in new issue
Block a user