Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
@@ -91,7 +91,7 @@ ADD_INTERFACE_LIBRARY(PpmDataPluginInterface
|
||||
svcPpmCommon
|
||||
)
|
||||
|
||||
IF(${Qt5WebEngineWidgets_VERSION} VERSION_GREATER 5.7.9)
|
||||
IF(QT_VERSION VERSION_GREATER_EQUAL 6.0.0)
|
||||
#
|
||||
# Combat Power Gui Plugin Interface
|
||||
#
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
NGL_ADD_LIBRARY(WS PpmDataPlugin MODULE ppm_data_plugin.cpp ppm_data_plugin.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(PpmDataPlugin
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
PpmDataPluginInterface
|
||||
svcPpmClient
|
||||
NGLLogger
|
||||
|
||||
+12
-3
@@ -6,15 +6,24 @@
|
||||
#
|
||||
|
||||
ADD_SUBDIRECTORY(Common)
|
||||
ADD_SUBDIRECTORY(MSDL)
|
||||
# MSDL requires XmlPatterns - skip for Qt6 migration baseline
|
||||
IF(BUILD_PLUGINS_MSDL)
|
||||
ADD_SUBDIRECTORY(MSDL)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(ParticipantEdit)
|
||||
ADD_SUBDIRECTORY(ParticipantInfo)
|
||||
ADD_SUBDIRECTORY(OperationalPlanning)
|
||||
ADD_SUBDIRECTORY(ParticipantOrgChart)
|
||||
# ParticipantOrgChart requires WebEngine - skip for Qt6 migration baseline
|
||||
IF(BUILD_PLUGINS_PARTICIPANT_ORG_CHART)
|
||||
ADD_SUBDIRECTORY(ParticipantOrgChart)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(ParticipantSelection)
|
||||
ADD_SUBDIRECTORY(ParticipantTemplates)
|
||||
ADD_SUBDIRECTORY(PartyEdit)
|
||||
ADD_SUBDIRECTORY(PpmComboBox)
|
||||
ADD_SUBDIRECTORY(Saab)
|
||||
# Saab requires XmlPatterns - skip for Qt6 migration baseline
|
||||
IF(BUILD_PLUGINS_SAAB)
|
||||
ADD_SUBDIRECTORY(Saab)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(TypeEdit)
|
||||
ADD_SUBDIRECTORY(Uas)
|
||||
+3
-3
@@ -53,15 +53,15 @@ NGL_ADD_LIBRARY2(WS PpmCommon SHARED ${participant_common_gui_SRCS} )
|
||||
NGL_TARGET_LINK_LIBRARIES(PpmCommon
|
||||
PRIVATE
|
||||
LtsSession
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
NGLLogger
|
||||
AsbDataPluginInterface
|
||||
ExmDataPluginInterface
|
||||
advancedSymbologyGui
|
||||
LtsUtilsSettings
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
nglwidgets
|
||||
svcPpmCommon
|
||||
LtsDataView
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "msdl_distype_editor.h"
|
||||
#include <utility>
|
||||
#include "ui_msdl_distype_editor.h"
|
||||
#include "msdl_types.h"
|
||||
|
||||
@@ -35,7 +36,7 @@ DistypeEditor::DistypeEditor(QWidget *parent,
|
||||
m_mapTypes = m_ppmDtc->types();
|
||||
std::set<ParticipantManagement::TypeClass> setTypeClasses;
|
||||
|
||||
for (const ParticipantManagement::Type &type : qAsConst(m_mapTypes))
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
const ParticipantManagement::TypeClass typeClassId = type.typeClass();
|
||||
|
||||
@@ -108,7 +109,7 @@ void DistypeEditor::slotTypeClassChanged()
|
||||
|
||||
int currentTypeClass = mUi->m_ltsComboBox_typeClass->currentData().toInt();
|
||||
|
||||
for (const ParticipantManagement::Type &type : qAsConst(m_mapTypes))
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
if (type.typeClass().underlying() != currentTypeClass)
|
||||
continue;
|
||||
|
||||
+4
-3
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "participant_dis_type_edit.h"
|
||||
#include <utility>
|
||||
#include "ui_participant_dis_type_edit.h"
|
||||
#include "participant_dis_helper.h"
|
||||
|
||||
@@ -100,7 +101,7 @@ void DISTypeEdit::switchType(int32_t typeId)
|
||||
|
||||
mUi->m_listWidget_distypes->clear();
|
||||
|
||||
for (int64_t disId : qAsConst(m_DisEntitiesByType[m_typeId]))
|
||||
for (int64_t disId : std::as_const(m_DisEntitiesByType[m_typeId]))
|
||||
mUi->m_listWidget_distypes->addItem(DIS::convertDISTypeInteger2DISString(disId));
|
||||
|
||||
|
||||
@@ -118,11 +119,11 @@ bool DISTypeEdit::apply()
|
||||
if(!hasChanges())
|
||||
return true;
|
||||
|
||||
for(int32_t typeId : qAsConst(m_setTouchedTypes))
|
||||
for(int32_t typeId : std::as_const(m_setTouchedTypes))
|
||||
{
|
||||
Type &touchedType = m_mapTypes[typeId];
|
||||
touchedType.disEntities().clear();
|
||||
for (int64_t disId : qAsConst(m_DisEntitiesByType[typeId]))
|
||||
for (int64_t disId : std::as_const(m_DisEntitiesByType[typeId]))
|
||||
touchedType.disEntities().push_back(disId);
|
||||
|
||||
m_requestHelper->addRequest([this, touchedType]()
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "participant_distype_editor.h"
|
||||
#include <utility>
|
||||
#include "ui_participant_distype_editor.h"
|
||||
|
||||
#include <LtsWidgets/lts_message_dialog.h>
|
||||
@@ -34,7 +35,7 @@ DistypeEditor::DistypeEditor(QWidget *parent,
|
||||
m_mapTypes = m_ppmDtc->types();
|
||||
std::set<ParticipantManagement::TypeClass> setTypeClasses;
|
||||
|
||||
for (const ParticipantManagement::Type &type : qAsConst(m_mapTypes))
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
const ParticipantManagement::TypeClass typeClassId = type.typeClass();
|
||||
|
||||
@@ -107,7 +108,7 @@ void DistypeEditor::slotTypeClassChanged()
|
||||
|
||||
int currentTypeClass = mUi->m_ltsComboBox_typeClass->currentData().toInt();
|
||||
|
||||
for (const ParticipantManagement::Type &type : qAsConst(m_mapTypes))
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
if (type.typeClass().underlying() != currentTypeClass)
|
||||
continue;
|
||||
|
||||
+4
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_edit_model.h"
|
||||
#include <utility>
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
#include <Plugins/AdvancedSymbology/asb_data_plugin_interface.h>
|
||||
#include <Symbology/symbol_data_to_render_role.h>
|
||||
@@ -553,7 +554,7 @@ void ParticipantEditModel::processMissingSuperiorId()
|
||||
gatherParticipants(tmap, parentId2id);
|
||||
|
||||
|
||||
for (int id : qAsConst(m_missingSuperiorId))
|
||||
for (int id : std::as_const(m_missingSuperiorId))
|
||||
{
|
||||
if (!tmap.contains(id))
|
||||
continue;
|
||||
@@ -566,7 +567,7 @@ void ParticipantEditModel::processMissingSuperiorId()
|
||||
continue;
|
||||
|
||||
const QSet<int> &childIds = parentId2id.value(id);
|
||||
for (int childId : qAsConst(childIds))
|
||||
for (int childId : std::as_const(childIds))
|
||||
{
|
||||
const ParticipantManagement::Participant &p = m_dtc->participant(childId);
|
||||
if (p.id() != childId)
|
||||
@@ -1464,7 +1465,7 @@ void ParticipantTableFilterProxyModel::onFilter()
|
||||
QList<int> rows = m_mapToSourceFiltered.keys();
|
||||
std::sort(rows.begin(), rows.end());
|
||||
int count = 0;
|
||||
for (const auto &row : qAsConst(rows))
|
||||
for (const auto &row : std::as_const(rows))
|
||||
{
|
||||
if (row == count)
|
||||
{
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_template_edit_model.h"
|
||||
#include <utility>
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
#include "participant_firing_unit_validator.h"
|
||||
#include <nglwidgets/ngltreeitem.h>
|
||||
@@ -379,7 +380,7 @@ bool ParticipantTemplateEditModel::onInsertTemplate(int rootId,
|
||||
|
||||
QVector<ParticipantManagement::TemplateParticipant> templateMap;
|
||||
m_dtc->templateParticipantsFromTemplateId(rootId, templateMap);
|
||||
for (const ParticipantManagement::TemplateParticipant &tmpl : qAsConst(templateMap))
|
||||
for (const ParticipantManagement::TemplateParticipant &tmpl : std::as_const(templateMap))
|
||||
{
|
||||
|
||||
if (!tmpl.templateId())
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ NGL_TARGET_LINK_LIBRARIES(PpmMSDLGuiPlugin
|
||||
PpmGuiPartyPluginInterface
|
||||
PpmDataPluginInterface
|
||||
PpmGuiComboboxPluginInterface
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
LtsDataView
|
||||
LtsUtilsGuiDds
|
||||
|
||||
+10
-6
@@ -5,8 +5,12 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
FIND_PACKAGE(XercesC REQUIRED)
|
||||
FIND_PACKAGE(XSD REQUIRED)
|
||||
FIND_PACKAGE(XercesC)
|
||||
FIND_PACKAGE(XSD)
|
||||
IF (NOT XercesC_FOUND OR NOT XSD_FOUND)
|
||||
MESSAGE(WARNING "XercesC or XSD not found; skipping MSDL")
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
SET(zwmsmsdl_SRCS
|
||||
msdl_export.cpp
|
||||
@@ -78,9 +82,9 @@ NGL_TARGET_INCLUDE_DIRECTORIES(zwmsmsdl
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(zwmsmsdl
|
||||
PRIVATE
|
||||
Qt5::Gui
|
||||
Qt5::Xml
|
||||
Qt5::XmlPatterns
|
||||
Qt6::Gui
|
||||
Qt6::Xml
|
||||
Qt6::XmlPatterns
|
||||
XercesC::XercesC
|
||||
PUBLIC
|
||||
svcPpmCommon
|
||||
@@ -95,7 +99,7 @@ NGL_TARGET_LINK_LIBRARIES(zwmsmsdl
|
||||
ngltools
|
||||
NGLLogger
|
||||
LtsWidgets
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
IF (WIN32)
|
||||
NGL_SET_TARGET_PROPERTIES(zwmsmsdl PROPERTIES UNITY_BUILD FALSE)
|
||||
|
||||
+3
-2
@@ -3,6 +3,7 @@
|
||||
|
||||
|
||||
#include <xsd/MilitaryScenario_1.0.0.hxx>
|
||||
#include <utility>
|
||||
#include <xsd/MsdlComplexTypes_1.0.0.hxx>
|
||||
|
||||
#include "msdl_import.h"
|
||||
@@ -86,7 +87,7 @@ ImportMsdl::ImportMsdl(ParticipantManagement::ParticipantEditModel *pModel, cons
|
||||
|
||||
|
||||
|
||||
for (const ParticipantManagement::Type &type : qAsConst(m_mapTypes))
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
for (const auto &disId : type.disEntities())
|
||||
{
|
||||
@@ -723,7 +724,7 @@ void ImportMsdl::buildImportTreeView(QVector<MSDLParticipant> &vecUnitsWithValid
|
||||
bool ImportMsdl::applyDISMappingChangesToDatabase()
|
||||
{
|
||||
|
||||
for (int32_t typeId : qAsConst(m_setTouchedTypes))
|
||||
for (int32_t typeId : std::as_const(m_setTouchedTypes))
|
||||
{
|
||||
const ParticipantManagement::Type &touchedType = m_mapTypes.value(typeId);
|
||||
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "msdl_mapping_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_msdl_mapping_dialog.h"
|
||||
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
@@ -23,7 +24,7 @@ MappingDialog::MappingDialog(QWidget *parent, bool typeClassIsUnit, const QStrin
|
||||
|
||||
|
||||
|
||||
for (const ParticipantManagement::Type &type : qAsConst(m_mapTypes))
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities().size() == 0))
|
||||
{
|
||||
@@ -69,7 +70,7 @@ void MappingDialog::slotClassTypeChanged()
|
||||
|
||||
int currentClass = mUi->m_ltsComboBox_typeClass->currentData().toInt();
|
||||
|
||||
for (const ParticipantManagement::Type &type : qAsConst(m_mapTypes))
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
if (type.typeClass().underlying() != currentClass)
|
||||
continue;
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ NGL_TARGET_LINK_LIBRARIES(PpmOperationalPlaningGuiPlugin
|
||||
PpmGuiPartyPluginInterface
|
||||
PpmDataPluginInterface
|
||||
PpmGuiComboboxPluginInterface
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
LtsDataView
|
||||
LtsUtilsGuiDds
|
||||
@@ -48,7 +48,7 @@ NGL_TARGET_LINK_LIBRARIES(PpmOperationalPlaningGuiPlugin
|
||||
PpmGuiComboboxPluginInterface
|
||||
PpmGuiTemplatesPluginInterface
|
||||
PpmDataPluginInterface
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
LtsSession
|
||||
LtsUtilsGuiDds
|
||||
|
||||
+6
-5
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_edit.h"
|
||||
#include <utility>
|
||||
#include "ui_participant_edit.h"
|
||||
|
||||
#include <Common/participant_beautify_view.h>
|
||||
@@ -465,7 +466,7 @@ void ParticipantEdit::onSelectionChangedInTree(const QItemSelection &selected, c
|
||||
{
|
||||
m_ui->tableViewEdit->blockSignals(true);
|
||||
QModelIndexList indexes = deselected.indexes();
|
||||
for (const QModelIndex &sourceIndex : qAsConst(indexes))
|
||||
for (const QModelIndex &sourceIndex : std::as_const(indexes))
|
||||
{
|
||||
QModelIndex proxyIndex = m_proxyTable->mapFromSource(sourceIndex);
|
||||
if (m_ui->tableViewEdit->selectionModel()->selectedIndexes().contains(proxyIndex))
|
||||
@@ -473,7 +474,7 @@ void ParticipantEdit::onSelectionChangedInTree(const QItemSelection &selected, c
|
||||
}
|
||||
|
||||
indexes = selected.indexes();
|
||||
for (const QModelIndex &sourceIndex : qAsConst(indexes))
|
||||
for (const QModelIndex &sourceIndex : std::as_const(indexes))
|
||||
{
|
||||
QModelIndex proxyIndex = m_proxyTable->mapFromSource(sourceIndex);
|
||||
if (!m_ui->tableViewEdit->selectionModel()->selectedIndexes().contains(proxyIndex))
|
||||
@@ -486,7 +487,7 @@ void ParticipantEdit::onSelectionChangedInTable(const QItemSelection &selected,
|
||||
{
|
||||
m_ui->treeViewEdit->blockSignals(true);
|
||||
QModelIndexList indexes = deselected.indexes();
|
||||
for (const QModelIndex &sourceIndex : qAsConst(indexes))
|
||||
for (const QModelIndex &sourceIndex : std::as_const(indexes))
|
||||
{
|
||||
QModelIndex proxyIndex = m_proxyTree->mapFromSource(sourceIndex);
|
||||
if (m_ui->treeViewEdit->selectionModel()->selectedIndexes().contains(proxyIndex))
|
||||
@@ -494,7 +495,7 @@ void ParticipantEdit::onSelectionChangedInTable(const QItemSelection &selected,
|
||||
}
|
||||
|
||||
indexes = selected.indexes();
|
||||
for (const QModelIndex &sourceIndex : qAsConst(indexes))
|
||||
for (const QModelIndex &sourceIndex : std::as_const(indexes))
|
||||
{
|
||||
QModelIndex proxyIndex = m_proxyTree->mapFromSource(sourceIndex);
|
||||
if (!m_ui->treeViewEdit->selectionModel()->selectedIndexes().contains(proxyIndex))
|
||||
@@ -528,7 +529,7 @@ void ParticipantEdit::onFilterChanged(LtsDataView::SearchModel *from, LtsDataVie
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const LtsWidgets::ComboboxFilterData &data : qAsConst(comboFilterContent.data))
|
||||
for (const LtsWidgets::ComboboxFilterData &data : std::as_const(comboFilterContent.data))
|
||||
if (data.data == comboBoxData)
|
||||
{
|
||||
to->setData(toIndex, data.text, Qt::DisplayRole);
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_orga_model.h"
|
||||
#include <utility>
|
||||
#include <Plugins/ParticipantManagement/ppm_mime_datas.h>
|
||||
#include <Common/participant_edit_model.h>
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
@@ -241,7 +242,7 @@ bool ParticipantOrgaModel::dropMimeData(const QMimeData *data, Qt::DropAction ac
|
||||
QHash<int, QSet<int>> parentId2id;
|
||||
parentId2id.reserve(movedParticipants.size());
|
||||
|
||||
for (const Participant &part : qAsConst(movedParticipants))
|
||||
for (const Participant &part : std::as_const(movedParticipants))
|
||||
{
|
||||
if (part.isDeleted())
|
||||
continue;
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_pool_model.h"
|
||||
#include <utility>
|
||||
#include <Plugins/ParticipantManagement/ppm_mime_datas.h>
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
#include <LtsSession/lts_session_data_dds.h>
|
||||
@@ -224,7 +225,7 @@ bool ParticipantPoolModel::addNewTemplateToPool(int id, const QString &designato
|
||||
|
||||
QVector<ParticipantManagement::ParticipantData> newPool;
|
||||
newPool.reserve(templateDatas.size());
|
||||
for (const TemplateParticipant &participant : qAsConst(templateDatas))
|
||||
for (const TemplateParticipant &participant : std::as_const(templateDatas))
|
||||
{
|
||||
ParticipantData newData;
|
||||
convertFromParticipantTemplateToParticipantData(participant, newData);
|
||||
|
||||
+4
-3
@@ -3,6 +3,7 @@
|
||||
|
||||
|
||||
#include "tactical_organisation.h"
|
||||
#include <utility>
|
||||
#include "ui_tactical_organisation.h"
|
||||
#include <Common/participant_beautify_view.h>
|
||||
#include <Common/participant_edit_item.h>
|
||||
@@ -117,7 +118,7 @@ bool TacticalOrganisation::apply()
|
||||
{
|
||||
ModifyParticipantDataRequest req;
|
||||
std::vector<ParticipantData> &dataToSend = req.data();
|
||||
for (const ParticipantEditModel *model : qAsConst(m_participantModels))
|
||||
for (const ParticipantEditModel *model : std::as_const(m_participantModels))
|
||||
{
|
||||
const auto c = model->participantData();
|
||||
dataToSend.insert(dataToSend.end(), c.begin(), c.end());
|
||||
@@ -137,7 +138,7 @@ void TacticalOrganisation::onModifyParticipantDataReply(const Core::FunctionRepl
|
||||
{
|
||||
if (!replyObject.error())
|
||||
{
|
||||
for (ParticipantEditModel *model : qAsConst(m_participantModels))
|
||||
for (ParticipantEditModel *model : std::as_const(m_participantModels))
|
||||
model->dataCommitted();
|
||||
}
|
||||
|
||||
@@ -206,7 +207,7 @@ void TacticalOrganisation::onParticipantSelected(int participantId)
|
||||
QModelIndex oldIdx = oldPem->indexFromParticipantId(participantId);
|
||||
if (!oldIdx.isValid())
|
||||
{
|
||||
for (ParticipantEditModel *model : qAsConst(m_participantModels))
|
||||
for (ParticipantEditModel *model : std::as_const(m_participantModels))
|
||||
{
|
||||
oldPem = model;
|
||||
oldIdx = oldPem->indexFromParticipantId(participantId);
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ NGL_TARGET_LINK_LIBRARIES(PpmParticipantInfoGuiPlugin
|
||||
PdmDataPluginInterface
|
||||
svcTgtClient
|
||||
PdmGuiPluginInterface
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
LtsSession
|
||||
LtsSessionData
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_bite_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_participant_bite_dialog.h"
|
||||
#include <ngltools/ngltools_dtg.h>
|
||||
|
||||
@@ -114,7 +115,7 @@ bool ParticipantBiteDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
int ParticipantBiteDialog::checkArguments(bool available, bool statusOk, qint64 bitValue, int i)
|
||||
{
|
||||
QString name;
|
||||
for (const ProjectDataManagement::CanComponentString &ccs : qAsConst(m_ccsMap))
|
||||
for (const ProjectDataManagement::CanComponentString &ccs : std::as_const(m_ccsMap))
|
||||
{
|
||||
if (ccs.bitMask() == bitValue)
|
||||
{
|
||||
|
||||
+4
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_config_model.h"
|
||||
#include <utility>
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
#include <Plugins/AdvancedSymbology/asb_data_plugin_interface.h>
|
||||
#include <Symbology/symbol_data_to_render_role.h>
|
||||
@@ -515,7 +516,7 @@ void ParticipantConfigModel::processMissingSuperiorId()
|
||||
gatherParticipants(tmap, parentId2id);
|
||||
|
||||
|
||||
for (int id : qAsConst(m_missingSuperiorId))
|
||||
for (int id : std::as_const(m_missingSuperiorId))
|
||||
{
|
||||
if (!tmap.contains(id))
|
||||
continue;
|
||||
@@ -528,7 +529,7 @@ void ParticipantConfigModel::processMissingSuperiorId()
|
||||
continue;
|
||||
|
||||
const QSet<int> &childIds = parentId2id.value(id);
|
||||
for (int childId : qAsConst(childIds))
|
||||
for (int childId : std::as_const(childIds))
|
||||
{
|
||||
const ParticipantManagement::Participant &p = m_dtc->participant(childId);
|
||||
if (p.id() != childId)
|
||||
@@ -1448,7 +1449,7 @@ void ParticipantTableFilterProxyConfigModel::onFilter()
|
||||
QList<int> rows = m_mapToSourceFiltered.keys();
|
||||
std::sort(rows.begin(), rows.end());
|
||||
int count = 0;
|
||||
for (const auto &row : qAsConst(rows))
|
||||
for (const auto &row : std::as_const(rows))
|
||||
{
|
||||
if (row == count)
|
||||
{
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_info_table_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <LtsUtilsCore/outdated_position.h>
|
||||
@@ -185,7 +186,7 @@ void ParticipantInfoTableModel::updateDataView(const QSet<int> &participantIds)
|
||||
|
||||
QSet<int> participantIdsToAdd(participantIds);
|
||||
|
||||
for (const auto &p : qAsConst(m_vecData))
|
||||
for (const auto &p : std::as_const(m_vecData))
|
||||
participantIdsToAdd.remove(p.id());
|
||||
|
||||
if (participantIdsToAdd.isEmpty())
|
||||
|
||||
+7
-6
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_set_injury_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_participant_set_injury_dialog.h"
|
||||
|
||||
#include <LtsSession/lts_session_data.h>
|
||||
@@ -125,7 +126,7 @@ void ParticipantSetInjuryDialog::createButtonGroups()
|
||||
QSpacerItem *item ;
|
||||
|
||||
m_bgInjury = new QButtonGroup(this);
|
||||
for (const auto &injuryKind : qAsConst(m_injuryKind))
|
||||
for (const auto &injuryKind : std::as_const(m_injuryKind))
|
||||
{
|
||||
rb = new QRadioButton(ProjectDataManagement::trSanitationInjuryKindName(injuryKind.name()), this);
|
||||
m_bgInjury->addButton(rb, injuryKind.id());
|
||||
@@ -137,7 +138,7 @@ void ParticipantSetInjuryDialog::createButtonGroups()
|
||||
|
||||
|
||||
m_bgBodypart = new QButtonGroup(this);
|
||||
for (const auto &injuryplace1 : qAsConst(m_injuryPlace1))
|
||||
for (const auto &injuryplace1 : std::as_const(m_injuryPlace1))
|
||||
{
|
||||
rb = new QRadioButton(ProjectDataManagement::trSanitationInjuryPlace1Name(injuryplace1.name()), this);
|
||||
m_bgBodypart->addButton(rb, injuryplace1.id());
|
||||
@@ -149,7 +150,7 @@ void ParticipantSetInjuryDialog::createButtonGroups()
|
||||
|
||||
|
||||
m_bgSide = new QButtonGroup(this);
|
||||
for (const auto &injuryplace2 : qAsConst(m_injuryPlace2))
|
||||
for (const auto &injuryplace2 : std::as_const(m_injuryPlace2))
|
||||
{
|
||||
rb = new QRadioButton(ProjectDataManagement::trSanitationInjuryPlace2Name(injuryplace2.name()), this);
|
||||
m_bgSide->addButton(rb, injuryplace2.id());
|
||||
@@ -204,7 +205,7 @@ void ParticipantSetInjuryDialog::checkRadioStatesBody()
|
||||
|
||||
resetRadioStates();
|
||||
bool firstAvailable = true;
|
||||
for (const ProjectDataManagement::SanitationInjury& injury : qAsConst(m_injuries))
|
||||
for (const ProjectDataManagement::SanitationInjury& injury : std::as_const(m_injuries))
|
||||
{
|
||||
if (injury.kind() == m_bgInjury->checkedId())
|
||||
{
|
||||
@@ -228,7 +229,7 @@ void ParticipantSetInjuryDialog::checkRadioStatesSides()
|
||||
|
||||
resetRadioStates(true);
|
||||
|
||||
for (const ProjectDataManagement::SanitationInjury& injury : qAsConst(m_injuries))
|
||||
for (const ProjectDataManagement::SanitationInjury& injury : std::as_const(m_injuries))
|
||||
{
|
||||
if (injury.kind() == m_bgInjury->checkedId() && injury.place1() == m_bgBodypart->checkedId())
|
||||
m_bgSide->button(injury.place2())->setEnabled(true);
|
||||
@@ -259,7 +260,7 @@ void ParticipantSetInjuryDialog::checkState()
|
||||
const QString &mediumDamage = tr("Middle");
|
||||
const QString &heavyDamage = tr("Serious");
|
||||
|
||||
for (const ProjectDataManagement::SanitationInjury& injury : qAsConst(m_injuries))
|
||||
for (const ProjectDataManagement::SanitationInjury& injury : std::as_const(m_injuries))
|
||||
{
|
||||
if (injury.kind() == m_bgInjury->checkedId() && injury.place1() == m_bgBodypart->checkedId() && injury.place2() == m_bgSide->checkedId())
|
||||
{
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_set_sanitation_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_participant_set_sanitation_dialog.h"
|
||||
#include <ProjectDataManagement/pdm_translation.h>
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
@@ -151,7 +152,7 @@ void ParticipantSetSanitationDialog::fillCb()
|
||||
qint64 ParticipantSetSanitationDialog::getProcedures()
|
||||
{
|
||||
qint64 ret = 0;
|
||||
for (const auto &cbx : qAsConst(m_procedures))
|
||||
for (const auto &cbx : std::as_const(m_procedures))
|
||||
{
|
||||
if (cbx->isChecked())
|
||||
ret += cbx->property("dataCode").toULongLong();
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_shootback_area_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <LtsUtilsCore/variant_operators.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
@@ -35,7 +36,7 @@ bool AreaModel::initModel(const TargetInformation &targetInformation)
|
||||
|
||||
INFO_LOG(m_logger) << "initModel - #AreaModel: " << targetInformation.shootbackAreas().size();
|
||||
|
||||
for (auto singleArea : qAsConst(targetInformation.shootbackAreas()))
|
||||
for (auto singleArea : std::as_const(targetInformation.shootbackAreas()))
|
||||
onShootbackAreaChanged(singleArea, DataModification::eAdded);
|
||||
|
||||
|
||||
@@ -125,7 +126,7 @@ void AreaModel::onShootbackAreaChanged(const ShootbackArea &data,
|
||||
void AreaModel::updateColumnFilter()
|
||||
{
|
||||
m_usedNames.clear();
|
||||
for (const ShootbackArea &item : qAsConst(m_vecData))
|
||||
for (const ShootbackArea &item : std::as_const(m_vecData))
|
||||
m_usedNames.insert(QString::fromStdString(item.identifier()));
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "participant_target_config_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_participant_target_config_dialog.h"
|
||||
#include <LtsSession/lts_session_data.h>
|
||||
#include <QTreeView>
|
||||
@@ -307,7 +308,7 @@ void ParticipantTargetConfigurationDialog::fillStatusComboBox()
|
||||
};
|
||||
|
||||
m_ui->cb_status->clear();
|
||||
for (auto item : qAsConst(cont))
|
||||
for (auto item : std::as_const(cont))
|
||||
{
|
||||
ProjectDataManagement::VulnerabilityState st = item;
|
||||
QString str = ProjectDataManagement::toString(st, ProjectDataManagement::VulnerabilityClass_def::VehicleDamages);
|
||||
@@ -327,7 +328,7 @@ void ParticipantTargetConfigurationDialog::fillPrewarningEffectComboBox()
|
||||
};
|
||||
|
||||
m_ui->cb_prewarningEffect->clear();
|
||||
for (auto item : qAsConst(cont))
|
||||
for (auto item : std::as_const(cont))
|
||||
{
|
||||
ProjectDataManagement::VulnerabilityState st = item;
|
||||
QString str = ProjectDataManagement::toString(st, ProjectDataManagement::VulnerabilityClass_def::VehicleDamages);
|
||||
@@ -345,7 +346,7 @@ void ParticipantTargetConfigurationDialog::fillTakeDownEffectComboBox()
|
||||
};
|
||||
|
||||
m_ui->cb_takeDownEffect->clear();
|
||||
for (auto item : qAsConst(cont))
|
||||
for (auto item : std::as_const(cont))
|
||||
{
|
||||
ProjectDataManagement::VulnerabilityState st = item;
|
||||
QString str = ProjectDataManagement::toString(st, ProjectDataManagement::VulnerabilityClass_def::VehicleDamages);
|
||||
|
||||
+4
-4
@@ -32,13 +32,13 @@ NGL_ADD_LIBRARY2(WS PpmOrgChartGuiPlugin MODULE ${participant_org_chart_gui_SRCS
|
||||
NGL_TARGET_LINK_LIBRARIES(PpmOrgChartGuiPlugin
|
||||
PRIVATE
|
||||
AsbDataPluginInterface
|
||||
Qt5::Widgets
|
||||
Qt5::WebEngineCore
|
||||
Qt5::WebEngineWidgets
|
||||
Qt6::Widgets
|
||||
Qt6::WebEngineCore
|
||||
Qt6::WebEngineWidgets
|
||||
LtsSession
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
nglwidgets
|
||||
svcPpmCommon
|
||||
PpmCommon
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "org_chart_main.h"
|
||||
#include <utility>
|
||||
#include "ui_org_chart_main.h"
|
||||
#include <QBuffer>
|
||||
#include <Plugins/AdvancedSymbology/asb_data_plugin_interface.h>
|
||||
@@ -321,7 +322,7 @@ bool OrgChartMain::initButtons()
|
||||
m_dtc->rootTemplates(templates);
|
||||
if (templates.isEmpty())
|
||||
return true;
|
||||
for (const ParticipantManagement::TemplateParticipant &templateData : qAsConst(templates))
|
||||
for (const ParticipantManagement::TemplateParticipant &templateData : std::as_const(templates))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " templateId = " << templateData.templateId()
|
||||
<< " typeId = " << templateData.typeId()
|
||||
@@ -583,7 +584,7 @@ void OrgChartMain::onPartyChanged()
|
||||
|
||||
const QColor &partyColor = currentPartyColor();
|
||||
AdvancedSymbology::Role role = currentPartyRole();
|
||||
for (const auto &helper : qAsConst(m_templateMimeDataHelpers))
|
||||
for (const auto &helper : std::as_const(m_templateMimeDataHelpers))
|
||||
{
|
||||
if (helper)
|
||||
helper->run(role, partyColor);
|
||||
|
||||
+7
-6
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_selection.h"
|
||||
#include <utility>
|
||||
|
||||
#include "ui_participant_selection.h"
|
||||
|
||||
@@ -224,7 +225,7 @@ void ParticipantSelection::accept()
|
||||
|
||||
QVector<int> participantIds;
|
||||
participantIds.reserve(indexList.size());
|
||||
for (const auto &index : qAsConst(indexList))
|
||||
for (const auto &index : std::as_const(indexList))
|
||||
{
|
||||
QModelIndex sourceIndex = m_proxyTable->mapToSource(index);
|
||||
if (index.column() != 0)
|
||||
@@ -320,7 +321,7 @@ void ParticipantSelection::onSelectionChangedInTree(const QItemSelection &select
|
||||
{
|
||||
m_ui->tableViewSelection->blockSignals(true);
|
||||
QModelIndexList indexes = deselected.indexes();
|
||||
for (const QModelIndex &sourceIndex : qAsConst(indexes))
|
||||
for (const QModelIndex &sourceIndex : std::as_const(indexes))
|
||||
{
|
||||
QModelIndex proxyIndex = m_proxyTable->mapFromSource(sourceIndex);
|
||||
if (m_ui->tableViewSelection->selectionModel()->selectedIndexes().contains(proxyIndex))
|
||||
@@ -328,7 +329,7 @@ void ParticipantSelection::onSelectionChangedInTree(const QItemSelection &select
|
||||
}
|
||||
|
||||
indexes = selected.indexes();
|
||||
for (const QModelIndex &sourceIndex : qAsConst(indexes))
|
||||
for (const QModelIndex &sourceIndex : std::as_const(indexes))
|
||||
{
|
||||
QModelIndex proxyIndex = m_proxyTable->mapFromSource(sourceIndex);
|
||||
if (!m_ui->tableViewSelection->selectionModel()->selectedIndexes().contains(proxyIndex))
|
||||
@@ -342,7 +343,7 @@ void ParticipantSelection::onSelectionChangedInTable(const QItemSelection &selec
|
||||
{
|
||||
m_ui->treeViewSelection->blockSignals(true);
|
||||
QModelIndexList indexes = deselected.indexes();
|
||||
for (const QModelIndex &sourceIndex : qAsConst(indexes))
|
||||
for (const QModelIndex &sourceIndex : std::as_const(indexes))
|
||||
{
|
||||
QModelIndex proxyIndex = m_proxyTree->mapFromSource(sourceIndex);
|
||||
if (m_ui->treeViewSelection->selectionModel()->selectedIndexes().contains(proxyIndex))
|
||||
@@ -350,7 +351,7 @@ void ParticipantSelection::onSelectionChangedInTable(const QItemSelection &selec
|
||||
}
|
||||
|
||||
indexes = selected.indexes();
|
||||
for (const QModelIndex &sourceIndex : qAsConst(indexes))
|
||||
for (const QModelIndex &sourceIndex : std::as_const(indexes))
|
||||
{
|
||||
QModelIndex proxyIndex = m_proxyTree->mapFromSource(sourceIndex);
|
||||
if (!m_ui->treeViewSelection->selectionModel()->selectedIndexes().contains(proxyIndex))
|
||||
@@ -386,7 +387,7 @@ void ParticipantSelection::onFilterChanged(LtsDataView::SearchModel *from, LtsDa
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const LtsWidgets::ComboboxFilterData &data : qAsConst(comboFilterContent.data))
|
||||
for (const LtsWidgets::ComboboxFilterData &data : std::as_const(comboFilterContent.data))
|
||||
if (data.data == comboBoxData)
|
||||
{
|
||||
to->setData(toIndex, data.text, Qt::DisplayRole);
|
||||
|
||||
+4
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "participant_selection_model.h"
|
||||
#include <utility>
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
#include <Plugins/AdvancedSymbology/asb_data_plugin_interface.h>
|
||||
#include <Symbology/symbol_data_to_render_role.h>
|
||||
@@ -413,7 +414,7 @@ void ParticipantSelectionModel::processMissingSuperiorId()
|
||||
gatherParticipants(tmap, parentId2id);
|
||||
|
||||
|
||||
for (int id : qAsConst(m_missingSuperiorId))
|
||||
for (int id : std::as_const(m_missingSuperiorId))
|
||||
{
|
||||
if (!tmap.contains(id))
|
||||
continue;
|
||||
@@ -426,7 +427,7 @@ void ParticipantSelectionModel::processMissingSuperiorId()
|
||||
continue;
|
||||
|
||||
const QSet<int> &childIds = parentId2id.value(id);
|
||||
for (int childId : qAsConst(childIds))
|
||||
for (int childId : std::as_const(childIds))
|
||||
{
|
||||
const ParticipantManagement::Participant &pChild = m_dtc->participant(childId);
|
||||
if (pChild.id() != childId)
|
||||
@@ -1291,7 +1292,7 @@ void ParticipantTableFilterProxyModel::onFilter()
|
||||
QList<int> rows = m_mapToSourceFiltered.keys();
|
||||
std::sort(rows.begin(), rows.end());
|
||||
int count = 0;
|
||||
for (const auto &row : qAsConst(rows))
|
||||
for (const auto &row : std::as_const(rows))
|
||||
{
|
||||
if (row == count)
|
||||
{
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ NGL_TARGET_LINK_LIBRARIES(PpmParticipantTemplatesGuiPlugin
|
||||
PpmGuiComboboxPluginInterface
|
||||
PpmDataPluginInterface
|
||||
PpmCommon
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
LtsSession
|
||||
LtsUtilsGuiDds
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ NGL_TARGET_LINK_LIBRARIES(PpmPartyEditGuiPlugin
|
||||
PpmGuiPartyPluginInterface
|
||||
PpmDataPluginInterface
|
||||
PpmGuiComboboxPluginInterface
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
LtsDataView
|
||||
nglwidgets
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ NGL_TARGET_LINK_LIBRARIES(PpmComboBoxGui
|
||||
PUBLIC
|
||||
LtsSession
|
||||
PpmGuiComboboxPluginInterface
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
svcPpmClient
|
||||
)
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ppm_combobox_gui_plugin.h"
|
||||
#include <utility>
|
||||
#include "ppm_combobox.h"
|
||||
#include "ppm_party_selector.h"
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
@@ -64,7 +65,7 @@ bool ForeignGuiComboboxInterfaceImpl::fillPartyComboBox(QComboBox *cbx, CbxParty
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const Party &party : qAsConst(parties))
|
||||
for (const Party &party : std::as_const(parties))
|
||||
{
|
||||
if (party.id() < 0)
|
||||
continue;
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@
|
||||
|
||||
|
||||
#include "ppm_party_selector.h"
|
||||
#include <utility>
|
||||
#include <QCheckBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPushButton>
|
||||
@@ -33,7 +34,7 @@ bool PartySelector::init(const std::shared_ptr<ParticipantManagement::Interface:
|
||||
if (!dtc->visibleParties(parties, visibleParties))
|
||||
return false;
|
||||
|
||||
for (const Party &party : qAsConst(parties))
|
||||
for (const Party &party : std::as_const(parties))
|
||||
{
|
||||
|
||||
QCheckBox *cb = new QCheckBox;
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ NGL_TARGET_LINK_LIBRARIES(PpmSAABGuiPlugin
|
||||
PpmGuiPartyPluginInterface
|
||||
PpmDataPluginInterface
|
||||
PpmGuiComboboxPluginInterface
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
LtsDataView
|
||||
LtsUtilsGuiDds
|
||||
|
||||
+4
-4
@@ -44,9 +44,9 @@ NGL_TARGET_INCLUDE_DIRECTORIES(zwmssaab
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(zwmssaab
|
||||
PRIVATE
|
||||
Qt5::Gui
|
||||
Qt5::Xml
|
||||
Qt5::XmlPatterns
|
||||
Qt6::Gui
|
||||
Qt6::Xml
|
||||
Qt6::XmlPatterns
|
||||
PUBLIC
|
||||
svcPpmCommon
|
||||
LtsUtilsSettings
|
||||
@@ -60,7 +60,7 @@ NGL_TARGET_LINK_LIBRARIES(zwmssaab
|
||||
ngltools
|
||||
NGLLogger
|
||||
LtsWidgets
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(zwmssaab)
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "saab_export.h"
|
||||
#include <utility>
|
||||
#include "ui_saab_export.h"
|
||||
#include "saab_xml_strings.h"
|
||||
#include "saab_map_type.h"
|
||||
@@ -431,7 +432,7 @@ SaabPlayer *ExportSaab::toSaabPlayer(const ParticipantManagement::Party &party,
|
||||
QList<int> keys = remainingParticipants.keys();
|
||||
|
||||
|
||||
for (int key : qAsConst(keys))
|
||||
for (int key : std::as_const(keys))
|
||||
{
|
||||
if (!remainingParticipants.contains(key))
|
||||
continue;
|
||||
|
||||
+10
-9
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "saab_import.h"
|
||||
#include <utility>
|
||||
#include "ui_saab_import.h"
|
||||
#include "saab_logging.h"
|
||||
#include "saab_import_show.h"
|
||||
@@ -205,7 +206,7 @@ void ImportSaab::createNode(const ParticipantManagement::ParticipantData &partic
|
||||
|
||||
SaabPerson ImportSaab::saabPersonByGUID(const QString &guid) const
|
||||
{
|
||||
for (const auto ¤t : qAsConst(m_saabPersons))
|
||||
for (const auto ¤t : std::as_const(m_saabPersons))
|
||||
{
|
||||
if (current.guid == guid)
|
||||
return current;
|
||||
@@ -216,7 +217,7 @@ SaabPerson ImportSaab::saabPersonByGUID(const QString &guid) const
|
||||
|
||||
SaabVehicle ImportSaab::saabVehicleByGUID(const QString &guid) const
|
||||
{
|
||||
for (const auto ¤t : qAsConst(m_saabVehicles))
|
||||
for (const auto ¤t : std::as_const(m_saabVehicles))
|
||||
{
|
||||
if (current.guid == guid)
|
||||
return current;
|
||||
@@ -265,7 +266,7 @@ void ImportSaab::importOrbat()
|
||||
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
for (SaabUnit *u : qAsConst(m_rootUnits))
|
||||
for (SaabUnit *u : std::as_const(m_rootUnits))
|
||||
DEBUG_LOG(m_logger) << u->toString();
|
||||
}
|
||||
|
||||
@@ -335,11 +336,11 @@ QVector<SaabPlayer *> ImportSaab::flattenedPlayersWithoutRootUnits() const
|
||||
{
|
||||
QVector<SaabPlayer *> result;
|
||||
|
||||
for (SaabUnit *p : qAsConst(m_rootUnits))
|
||||
for (SaabUnit *p : std::as_const(m_rootUnits))
|
||||
{
|
||||
QVector<SaabPlayer *> inferiorInferiors = inferiors(p);
|
||||
|
||||
for (SaabPlayer *infInf : qAsConst(inferiorInferiors))
|
||||
for (SaabPlayer *infInf : std::as_const(inferiorInferiors))
|
||||
result.append(infInf);
|
||||
}
|
||||
|
||||
@@ -361,10 +362,10 @@ QVector<SaabPlayer *> ImportSaab::inferiors(SaabPlayer *player) const
|
||||
if (!m_rootUnits.contains(unit))
|
||||
result.append(player);
|
||||
|
||||
for (SaabPlayer *inf : qAsConst(unit->inferiors))
|
||||
for (SaabPlayer *inf : std::as_const(unit->inferiors))
|
||||
{
|
||||
QVector<SaabPlayer *> inferiorInferiors = inferiors(inf);
|
||||
for (SaabPlayer *infInf : qAsConst(inferiorInferiors))
|
||||
for (SaabPlayer *infInf : std::as_const(inferiorInferiors))
|
||||
result.append(infInf);
|
||||
}
|
||||
|
||||
@@ -544,7 +545,7 @@ void ImportSaab::importExerciseScenario()
|
||||
importRefData(m_saabVehicles, SAAB_VEHICLES(), SAAB_VEHICLE(), SAAB_REGISTRATION_NUMBER(), SAAB_DESCRIPTION());
|
||||
importOrbat();
|
||||
|
||||
for (SaabUnit *party : qAsConst(m_rootUnits))
|
||||
for (SaabUnit *party : std::as_const(m_rootUnits))
|
||||
insertParty(party);
|
||||
|
||||
QVector<SaabPlayer *> vecUnitsWithValidDISTypes = resolveImportMapping(flattenedPlayersWithoutRootUnits());
|
||||
@@ -772,7 +773,7 @@ QVector<SaabPlayer *> ImportSaab::showMappingDialog(const QMap<QString, QVector<
|
||||
{
|
||||
m_mapSaabSymbolToType.insert(strSaabSymbol, mappedTypeId);
|
||||
|
||||
for (SaabPlayer *participant : qAsConst(vecData))
|
||||
for (SaabPlayer *participant : std::as_const(vecData))
|
||||
{
|
||||
participant->mappedTypeId = mappedTypeId;
|
||||
vecUnitsWithValidSymbols.push_back(participant);
|
||||
|
||||
+2
-1
@@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <nglwidgets/ngldialog.h>
|
||||
#include <utility>
|
||||
#include "saab_logging.h"
|
||||
#include "saab_types.h"
|
||||
#include "zwmssaab_export.h"
|
||||
@@ -148,7 +149,7 @@ private:
|
||||
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
for (const T ¤t : qAsConst(vec))
|
||||
for (const T ¤t : std::as_const(vec))
|
||||
DEBUG_LOG(m_logger) << childTag << ": " << current.toString();
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "saab_map_party.h"
|
||||
#include <utility>
|
||||
#include "ui_saab_map_party.h"
|
||||
|
||||
#include "saab_map_type.h"
|
||||
@@ -24,21 +25,21 @@ MapParty::MapParty(const QString &partyName,
|
||||
|
||||
std::sort(forcesList.begin(), forcesList.end());
|
||||
|
||||
for (const QString ¤t : qAsConst(forcesList))
|
||||
for (const QString ¤t : std::as_const(forcesList))
|
||||
m_ui->cbForce->addItem(current);
|
||||
|
||||
QList<SaabEchelon> echelonList = echelons.values();
|
||||
|
||||
sortList(echelonList);
|
||||
|
||||
for (const SaabEchelon ¤t : qAsConst(echelonList))
|
||||
for (const SaabEchelon ¤t : std::as_const(echelonList))
|
||||
m_ui->cbEchelon->addItem(current.text, current.code);
|
||||
|
||||
QList<SaabSymbol> symbolList = symbols.values();
|
||||
|
||||
sortList(symbolList);
|
||||
|
||||
for (const SaabSymbol ¤t : qAsConst(symbolList))
|
||||
for (const SaabSymbol ¤t : std::as_const(symbolList))
|
||||
m_ui->cbSymbol->addItem(current.text, current.code);
|
||||
|
||||
connect(m_ui->pbApply, &QPushButton::clicked,
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "saab_map_type.h"
|
||||
#include <utility>
|
||||
#include "ui_saab_map_type.h"
|
||||
|
||||
namespace saab
|
||||
@@ -29,7 +30,7 @@ MapType::MapType(const QString &text, const QMap<QString, SaabEchelon> &echelons
|
||||
|
||||
sortList(echelonList);
|
||||
|
||||
for (const SaabEchelon ¤t : qAsConst(echelonList))
|
||||
for (const SaabEchelon ¤t : std::as_const(echelonList))
|
||||
m_ui->cbEchelon->addItem(current.text, current.code);
|
||||
}
|
||||
|
||||
@@ -37,7 +38,7 @@ MapType::MapType(const QString &text, const QMap<QString, SaabEchelon> &echelons
|
||||
|
||||
sortList(symbolList);
|
||||
|
||||
for (const SaabSymbol ¤t : qAsConst(symbolList))
|
||||
for (const SaabSymbol ¤t : std::as_const(symbolList))
|
||||
m_ui->cbSymbol->addItem(current.text, current.code);
|
||||
|
||||
connect(m_ui->pbApply, &QPushButton::clicked,
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "saab_mapping_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_saab_mapping_dialog.h"
|
||||
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
@@ -23,7 +24,7 @@ MappingDialog::MappingDialog(QWidget *parent, bool typeClassIsUnit, const QStrin
|
||||
|
||||
|
||||
|
||||
for (const ParticipantManagement::Type &type : qAsConst(m_mapTypes))
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities().size() == 0))
|
||||
{
|
||||
@@ -77,7 +78,7 @@ void MappingDialog::slotClassTypeChanged()
|
||||
|
||||
int currentClass = mUi->m_ltsComboBox_typeClass->currentData().toInt();
|
||||
|
||||
for (const ParticipantManagement::Type &type : qAsConst(m_mapTypes))
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
if(type.isDeleted())
|
||||
continue;
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "saab_types.h"
|
||||
#include <utility>
|
||||
#include <QRegularExpression>
|
||||
#include <QStringList>
|
||||
#include <QXmlStreamWriter>
|
||||
@@ -80,7 +81,7 @@ QString SaabUnit::toStringWithDepth(int depth) const
|
||||
for (int i = 0; i <= depth; ++i)
|
||||
spaces.append(QStringLiteral(" "));
|
||||
|
||||
for (SaabPlayer *current : qAsConst(inferiors))
|
||||
for (SaabPlayer *current : std::as_const(inferiors))
|
||||
{
|
||||
SaabUnit *unit = dynamic_cast<SaabUnit *>(current);
|
||||
QString line = QStringLiteral("%1|\n%1+-- %2\n")
|
||||
@@ -106,7 +107,7 @@ void SaabUnit::writeToXml(QXmlStreamWriter *writer) const
|
||||
|
||||
if (!inferiors.isEmpty())
|
||||
{
|
||||
for (SaabPlayer *player : qAsConst(inferiors))
|
||||
for (SaabPlayer *player : std::as_const(inferiors))
|
||||
player->writeToXml(writer);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ NGL_TARGET_LINK_LIBRARIES(PpmTypeEditGuiPlugin
|
||||
PpmMSDLGuiPluginInterface
|
||||
PpmDataPluginInterface
|
||||
PpmGuiComboboxPluginInterface
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
LtsDataView
|
||||
LtsUtilsGuiDds
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ppm_type_model.h"
|
||||
#include <utility>
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
#include <LtsSession/lts_session_data_dds.h>
|
||||
#include <LtsWidgets/lts_column_filter_proxy_model.h>
|
||||
@@ -223,10 +224,10 @@ void TypeModel::updateFilterTypeClasses()
|
||||
LtsWidgets::ComboboxFilterContent cfc;
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
QSet<TypeClass> typeClasses;
|
||||
for (const auto &r : qAsConst(m_vecData))
|
||||
for (const auto &r : std::as_const(m_vecData))
|
||||
typeClasses.insert(r.typeClass());
|
||||
|
||||
for (const auto tc : qAsConst(typeClasses))
|
||||
for (const auto tc : std::as_const(typeClasses))
|
||||
{
|
||||
cfd.data = tc.underlying();
|
||||
cfd.text = toString(tc);
|
||||
|
||||
Reference in new issue
Block a user