Close ppm.msdl/ppm.saab floors: re-implement MSDL/SAAB import without Qt XmlPatterns
Qt6::Xml (QDomDocument) + xmllint schema check; MSDL links XercesC + xsdc++ tree classes; both moved into GROUP12
This commit is contained in:
18 files changed
+179
-248
No files matched your search
+3
-1
@@ -79,6 +79,9 @@ INSTALL_SHARED_FILES(zwmsmsdl_SRCS
|
||||
WS
|
||||
)
|
||||
|
||||
# .ui files live in the ui/ subdirectory; tell AUTOUIC where to find them
|
||||
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/ui)
|
||||
|
||||
NGL_WRAP_UI(zwmsmsdl_SRCS ${zwmsmsdl_UICS})
|
||||
NGL_ADD_LIBRARY2(WS zwmsmsdl SHARED ${zwmsmsdl_SRCS} ${zwmsmsdl_UICS} ${zwmsmsdl_IDLS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(zwmsmsdl
|
||||
@@ -93,7 +96,6 @@ if(QT6_GUI_AVAILABLE)
|
||||
PRIVATE
|
||||
${Qt6_Gui}
|
||||
Qt6::Xml
|
||||
Qt6::XmlPatterns
|
||||
XercesC::XercesC
|
||||
PUBLIC
|
||||
svcPpmCommon
|
||||
|
||||
+21
-21
@@ -184,7 +184,7 @@ msdl_1::MilitaryScenarioType::ForceSides_type Private::createTagForceSides(const
|
||||
for (const ParticipantManagement::Party &party : mapForces)
|
||||
{
|
||||
|
||||
if (party.id() == 0 || party.id() == 1)
|
||||
if (party.id == 0 || party.id == 1)
|
||||
continue;
|
||||
|
||||
QString obHaStr = QUuid::createUuid().toString();
|
||||
@@ -202,7 +202,7 @@ msdl_1::MilitaryScenarioType::ForceSides_type Private::createTagForceSides(const
|
||||
const ParticipantManagement::Party &party = itForce.value();
|
||||
|
||||
msdl_1::ForceSideType::ObjectHandle_type obHaTy(strUUID.toStdString().c_str());
|
||||
msdl_1::ForceSideType::ForceSideName_type foSiNaTy(party.name().c_str());
|
||||
msdl_1::ForceSideType::ForceSideName_type foSiNaTy(party.name.c_str());
|
||||
msdl_1::ForceSideType foSiTy(obHaTy, foSiNaTy);
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ msdl_1::MilitaryScenarioType::ForceSides_type Private::createTagForceSides(const
|
||||
|
||||
|
||||
|
||||
ParticipantManagement::Role role = itRelationship.value().role();
|
||||
ParticipantManagement::Role role = itRelationship.value().role;
|
||||
|
||||
msdl_1::ForceSideType::Associations_type::Association_type::Relationship_type relType = msdl_1::ForceSideType::Associations_type::Association_type::Relationship_type::UNK;
|
||||
if (role == ParticipantManagement::Role::Enemy)
|
||||
@@ -238,7 +238,7 @@ msdl_1::MilitaryScenarioType::ForceSides_type Private::createTagForceSides(const
|
||||
|
||||
foSiTy.Associations(asType);
|
||||
foSiSe.push_back(foSiTy);
|
||||
mapForceHandles[party.id()] = strUUID;
|
||||
mapForceHandles[party.id] = strUUID;
|
||||
}
|
||||
|
||||
return foType;
|
||||
@@ -315,7 +315,7 @@ msdl_1::MilitaryScenarioType::Organizations_type::Units_type Private::createTagU
|
||||
QString obHaStr = QUuid::createUuid().toString();
|
||||
obHaStr = obHaStr.mid(1, obHaStr.size() - 2);
|
||||
|
||||
mapParticipantsUUIDs[participant.id()] = obHaStr.toStdString();
|
||||
mapParticipantsUUIDs[participant.id] = obHaStr.toStdString();
|
||||
}
|
||||
|
||||
unitsType unitsTy;
|
||||
@@ -326,16 +326,16 @@ msdl_1::MilitaryScenarioType::Organizations_type::Units_type Private::createTagU
|
||||
for (const ParticipantManagement::Participant &participant : mapParticipants)
|
||||
{
|
||||
|
||||
if (participant.partyId() != it.key())
|
||||
if (participant.partyId != it.key())
|
||||
continue;
|
||||
|
||||
if (participant.isDeleted())
|
||||
if (participant.isDeleted)
|
||||
continue;
|
||||
|
||||
forceRelationDataType foReDaTy;
|
||||
forceRelationChoiceType foReChTy = forceRelationChoiceType::FORCE_SIDE;
|
||||
|
||||
if (participant.superiorId() == 0)
|
||||
if (participant.superiorId == 0)
|
||||
{
|
||||
foReChTy = forceRelationChoiceType::FORCE_SIDE;
|
||||
|
||||
@@ -346,12 +346,12 @@ msdl_1::MilitaryScenarioType::Organizations_type::Units_type Private::createTagU
|
||||
{
|
||||
foReChTy = forceRelationChoiceType::UNIT;
|
||||
|
||||
msdl_1::CommandRelationType::CommandingSuperiorHandle_type handle(mapParticipantsUUIDs.value(participant.superiorId()));
|
||||
msdl_1::CommandRelationType::CommandingSuperiorHandle_type handle(mapParticipantsUUIDs.value(participant.superiorId));
|
||||
forceRelationDataType::CommandRelation_type cmdRelation(handle, msdl_1::CommandRelationType::CommandRelationshipType_type::TACON);
|
||||
foReDaTy.CommandRelation(cmdRelation);
|
||||
}
|
||||
|
||||
unitType::ObjectHandle_type unObHaTy(mapParticipantsUUIDs.value(participant.id()));
|
||||
unitType::ObjectHandle_type unObHaTy(mapParticipantsUUIDs.value(participant.id));
|
||||
unitType::SymbolIdentifier_type syIdTy = "S--------------";
|
||||
|
||||
relationsType::ForceRelation_type foReTy(foReChTy, foReDaTy);
|
||||
@@ -360,7 +360,7 @@ msdl_1::MilitaryScenarioType::Organizations_type::Units_type Private::createTagU
|
||||
unitType unitTy(unObHaTy, syIdTy, reTy);
|
||||
unitTy.SymbolIdentifier(syIdTy);
|
||||
|
||||
unitType::Name_type naTy(participant.designator().c_str());
|
||||
unitType::Name_type naTy(participant.designator.c_str());
|
||||
unitTy.Name(naTy);
|
||||
|
||||
unSe.push_back(unitTy);
|
||||
@@ -389,16 +389,16 @@ msdl_1::MilitaryScenarioType::Organizations_type::Equipment_type Private::create
|
||||
for (const ParticipantManagement::Participant &participant : mapParticipants)
|
||||
{
|
||||
|
||||
if (participant.partyId() != partyId)
|
||||
if (participant.partyId != partyId)
|
||||
continue;
|
||||
|
||||
if (participant.isDeleted())
|
||||
if (participant.isDeleted)
|
||||
continue;
|
||||
|
||||
|
||||
|
||||
ownerDataType::UnitOwnerHandle_type foOwHaTy;
|
||||
foOwHaTy = mapParticipantsUUIDs.value(participant.id()).c_str();
|
||||
foOwHaTy = mapParticipantsUUIDs.value(participant.id).c_str();
|
||||
|
||||
ownerDataType owDaTy;
|
||||
owDaTy.UnitOwnerHandle(foOwHaTy);
|
||||
@@ -409,11 +409,11 @@ msdl_1::MilitaryScenarioType::Organizations_type::Equipment_type Private::create
|
||||
|
||||
|
||||
|
||||
auto vecDISEntities = mapTypes.value(participant.typeId()).disEntities();
|
||||
auto vecDISEntities = mapTypes.value(participant.typeId).disEntities;
|
||||
if (!vecDISEntities.size())
|
||||
{
|
||||
WARNING_LOG(logger) << "Participant id " << participant.id()
|
||||
<< " belongs to a type id " << participant.typeId() << " which has no DIS id! Skipping export of participant!";
|
||||
WARNING_LOG(logger) << "Participant id " << participant.id
|
||||
<< " belongs to a type id " << participant.typeId << " which has no DIS id! Skipping export of participant!";
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -425,9 +425,9 @@ msdl_1::MilitaryScenarioType::Organizations_type::Equipment_type Private::create
|
||||
|
||||
|
||||
|
||||
coordDataType::GCC_type::X_type x(mapParticipantPositions[participant.id()].pos().lon());
|
||||
coordDataType::GCC_type::X_type y(mapParticipantPositions[participant.id()].pos().lat());
|
||||
coordDataType::GCC_type::Z_type z(mapParticipantPositions[participant.id()].pos().z());
|
||||
coordDataType::GCC_type::X_type x(mapParticipantPositions[participant.id].pos.lon);
|
||||
coordDataType::GCC_type::X_type y(mapParticipantPositions[participant.id].pos.lat);
|
||||
coordDataType::GCC_type::Z_type z(mapParticipantPositions[participant.id].pos.z);
|
||||
|
||||
coordDataType::GCC_type utTy(x, y, z);
|
||||
coordDataType coDaTy;
|
||||
@@ -459,7 +459,7 @@ msdl_1::MilitaryScenarioType::Organizations_type::Equipment_type Private::create
|
||||
eqItTy.ObjectHandle(eqObHaTy);
|
||||
|
||||
|
||||
equipItemType::Name_type naTy(mapEquipment.value(mapTypes.value(participant.typeId()).equipmentTypeId()).name());
|
||||
equipItemType::Name_type naTy(mapEquipment.value(mapTypes.value(participant.typeId).equipmentTypeId).name);
|
||||
eqItTy.Name(naTy);
|
||||
|
||||
eqItTy.SymbolIdentifier(syIdTy);
|
||||
|
||||
+5
-5
@@ -22,21 +22,21 @@ ScenarioDataDialog::ScenarioDataDialog(QWidget *parent,
|
||||
connect(mUi->m_pushButton_Cancel, &QPushButton::clicked, this, &ScenarioDataDialog::onButtonCancel);
|
||||
|
||||
ExerciseManagement::Exercise exercise = exmDtc->exercise(pSession->exerciseId());
|
||||
mUi->m_lineEdit_ExerciseDescription->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseDescription"), QString::fromStdString(exercise.description())).toString());
|
||||
mUi->m_lineEdit_ExerciseDescription->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseDescription"), QString::fromStdString(exercise.description)).toString());
|
||||
|
||||
|
||||
QString strName(QString::fromStdString(exercise.name()));
|
||||
QString strName(QString::fromStdString(exercise.name));
|
||||
strName.remove(QLatin1Char(' '));
|
||||
|
||||
mUi->m_lineEdit_ExerciseName->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseName"), strName).toString());
|
||||
mUi->m_lineEdit_Domain->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseDomain"), QString::fromStdString(exercise.partitionName())).toString());
|
||||
mUi->m_lineEdit_Domain->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseDomain"), QString::fromStdString(exercise.partitionName)).toString());
|
||||
mUi->m_lineEdit_Version->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exerciseVersion"), QString()).toString());
|
||||
mUi->m_lineEdit_Purpose->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("exercisePurpose"), QString()).toString());
|
||||
|
||||
OperatorManagement::User user = opmDtc->user(LtsSessionData::LtsSessionData::getInstance()->getOperatorId());
|
||||
|
||||
mUi->m_lineEdit_Type->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocType"), QString::fromStdString(user.description())).toString());
|
||||
mUi->m_lineEdit_AuthorName->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocAuthor"), QString::fromStdString(user.name())).toString());
|
||||
mUi->m_lineEdit_Type->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocType"), QString::fromStdString(user.description)).toString());
|
||||
mUi->m_lineEdit_AuthorName->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocAuthor"), QString::fromStdString(user.name)).toString());
|
||||
mUi->m_lineEdit_Organization->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocOrganization"), QString()).toString());
|
||||
mUi->m_lineEdit_Email->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocEmail"), QString()).toString());
|
||||
mUi->m_lineEdit_Telephone->setText(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("MSDL"), QStringLiteral("pocTelephone"), QString()).toString());
|
||||
|
||||
+17
-32
@@ -17,12 +17,9 @@
|
||||
#include <QtCore/QUuid>
|
||||
#include <QtCore/QTextStream>
|
||||
#include <QtCore/QUrl>
|
||||
#include <QAbstractMessageHandler>
|
||||
#include <QtXml/QDomDocument>
|
||||
#include <QMimeData>
|
||||
#include <QtCore/QProcess>
|
||||
#include <QtXmlPatterns/QXmlSchema>
|
||||
#include <QtXmlPatterns/QXmlSchemaValidator>
|
||||
|
||||
#include <ngltools/ngltools_filesystem.h>
|
||||
#include <Common/participant_dis_helper.h>
|
||||
@@ -89,17 +86,17 @@ ImportMsdl::ImportMsdl(ParticipantManagement::ParticipantEditModel *pModel, cons
|
||||
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
for (const auto &disId : type.disEntities())
|
||||
for (const auto &disId : type.disEntities)
|
||||
{
|
||||
QString strMSDL_DISId = ParticipantManagement::DIS::convertDISTypeInteger2MSDLString(disId);
|
||||
|
||||
if (m_mapMSDL_DIS_2TypeId.find(strMSDL_DISId) != m_mapMSDL_DIS_2TypeId.end())
|
||||
{
|
||||
WARNING_LOG(mLogger) << "DIS id \"" << strMSDL_DISId << "\" which is assigned to type id \"" << type.id() << "\" is already assigned to type id \"" << m_mapMSDL_DIS_2TypeId[strMSDL_DISId] << "\"";
|
||||
WARNING_LOG(mLogger) << "DIS id \"" << strMSDL_DISId << "\" which is assigned to type id \"" << type.id << "\" is already assigned to type id \"" << m_mapMSDL_DIS_2TypeId[strMSDL_DISId] << "\"";
|
||||
continue;
|
||||
}
|
||||
|
||||
m_mapMSDL_DIS_2TypeId[strMSDL_DISId] = type.id();
|
||||
m_mapMSDL_DIS_2TypeId[strMSDL_DISId] = type.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -286,13 +283,14 @@ bool ImportMsdl::schemaValidation()
|
||||
return false;
|
||||
}
|
||||
|
||||
QXmlSchema schema;
|
||||
msdl::SchemaMessageHandler smh;
|
||||
schema.setMessageHandler(&smh);
|
||||
schema.load(&schemaFile, QUrl::fromLocalFile(schemaFile.fileName()));
|
||||
// Qt6: Qt XmlPatterns (QXmlSchema) was removed. Check the schema file is
|
||||
// well-formed XML via Qt6::Xml (QDomDocument); the external xmllint step below
|
||||
// performs the full schema/instance validation.
|
||||
QDomDocument schemaDoc;
|
||||
schemaDoc.setContent(&schemaFile, false);
|
||||
|
||||
|
||||
if (!schema.isValid())
|
||||
if (schemaDoc.documentElement().isNull())
|
||||
{
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Schema is invalid"));
|
||||
return false;
|
||||
@@ -322,16 +320,6 @@ bool ImportMsdl::schemaValidation()
|
||||
#endif
|
||||
|
||||
|
||||
QXmlSchemaValidator validator(schema);
|
||||
|
||||
if (false )
|
||||
{
|
||||
#ifdef LTS_DEBUG
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Instance document is invalid"));
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -341,17 +329,14 @@ ParticipantManagement::ParticipantData ImportMsdl::createParticipant(const MSDLP
|
||||
ParticipantManagement::ParticipantData p;
|
||||
|
||||
|
||||
p.designator(unit.m_designator.toStdString());
|
||||
p.tacticalIdentifier(unit.m_tacticalIdentifier.toStdString());
|
||||
p.designator = unit.m_designator.toStdString();
|
||||
p.tacticalIdentifier = unit.m_tacticalIdentifier.toStdString();
|
||||
|
||||
|
||||
p.equipmentNumber() = 0;
|
||||
p.assignState() = ParticipantManagement::ParticipantAssignState::HandoutExcon;
|
||||
p.equipmentNumber = 0;
|
||||
p.assignState = ParticipantManagement::ParticipantAssignState::HandoutExcon;
|
||||
|
||||
|
||||
|
||||
p.symbol(m_mapTypes[unit.m_mappedTypeId].symbol());
|
||||
p.typeId(unit.m_mappedTypeId);
|
||||
p.symbol = m_mapTypes[unit.m_mappedTypeId].symbol;
|
||||
p.typeId = unit.m_mappedTypeId;
|
||||
|
||||
return p;
|
||||
}
|
||||
@@ -370,7 +355,7 @@ void ImportMsdl::insertParty(const MSDLParty &party)
|
||||
{
|
||||
|
||||
ParticipantManagement::ParticipantData newParty;
|
||||
newParty.designator(party.m_forceSideName.toStdString());
|
||||
newParty.designator = party.m_forceSideName.toStdString();
|
||||
createNode(newParty, m_indexRoot, party.m_ownHandle);
|
||||
}
|
||||
|
||||
@@ -753,7 +738,7 @@ void ImportMsdl::mapParticipant2Type(MSDLParticipant &participant, qint32 mapped
|
||||
{
|
||||
m_mapMSDL_DIS_2TypeId[participant.m_DISTypeMSDL] = mappedTypeId;
|
||||
|
||||
m_mapTypes[mappedTypeId].disEntities().push_back(ParticipantManagement::DIS::convertMSDLString2Integer(participant.m_DISTypeMSDL));
|
||||
m_mapTypes[mappedTypeId].disEntities.push_back(ParticipantManagement::DIS::convertMSDLString2Integer(participant.m_DISTypeMSDL));
|
||||
m_setTouchedTypes.insert(mappedTypeId);
|
||||
}
|
||||
}
|
||||
|
||||
-15
@@ -182,18 +182,3 @@ void ImportMsdlShow::slotCustomContextMenuActionTriggered(QAction *ac)
|
||||
}
|
||||
|
||||
|
||||
void SchemaMessageHandler::handleMessage(QtMsgType type,
|
||||
const QString &description,
|
||||
const QUrl &identifier,
|
||||
const QSourceLocation &sourceLocation)
|
||||
{
|
||||
ERROR_LOG(mLogger) << "type: " << type << " desc: " << description;
|
||||
if (identifier.isValid())
|
||||
ERROR_LOG(mLogger) << "identifier: " << identifier.toString();
|
||||
if (!sourceLocation.isNull())
|
||||
ERROR_LOG(mLogger) << "sourceLocation: "
|
||||
<< sourceLocation.uri().toString()
|
||||
<< " line: " << sourceLocation.line()
|
||||
<< " column: " << sourceLocation.column()
|
||||
;
|
||||
}
|
||||
-18
@@ -4,7 +4,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtXml/QDomDocument>
|
||||
#include <QtXmlPatterns/QAbstractMessageHandler>
|
||||
#include <nglwidgets/ngldialog.h>
|
||||
#include "msdl_logging.h"
|
||||
|
||||
@@ -13,23 +12,6 @@
|
||||
|
||||
namespace msdl
|
||||
{
|
||||
class SchemaMessageHandler : public QAbstractMessageHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SchemaMessageHandler(QObject *parent = nullptr)
|
||||
: QAbstractMessageHandler(parent)
|
||||
, mLogger(getLogger("SchemaMessageHandler"))
|
||||
{}
|
||||
protected:
|
||||
void handleMessage(QtMsgType type,
|
||||
const QString &description,
|
||||
const QUrl &identifier = QUrl(),
|
||||
const QSourceLocation &sourceLocation = QSourceLocation()) override;
|
||||
private:
|
||||
LOGGER_T mLogger;
|
||||
};
|
||||
|
||||
class ImportMsdlShow : public NGLDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
+10
-10
@@ -26,13 +26,13 @@ MappingDialog::MappingDialog(QWidget *parent, bool typeClassIsUnit, const QStrin
|
||||
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities().size() == 0))
|
||||
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities.size() == 0))
|
||||
{
|
||||
WARNING_LOG(mLogger) << "Type id " << type.id() << " does not have assigned DIS types! Type cannot be used when importing MSDL data!";
|
||||
WARNING_LOG(mLogger) << "Type id " << type.id << " does not have assigned DIS types! Type cannot be used when importing MSDL data!";
|
||||
continue;
|
||||
}
|
||||
|
||||
const ParticipantManagement::TypeClass typeClassId = type.typeClass();
|
||||
const ParticipantManagement::TypeClass typeClassId = type.typeClass;
|
||||
|
||||
if (typeClassIsUnit)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ MappingDialog::MappingDialog(QWidget *parent, bool typeClassIsUnit, const QStrin
|
||||
}
|
||||
|
||||
for (const auto &typeclass : setTypeClasses)
|
||||
mUi->m_ltsComboBox_typeClass->addItem(ParticipantManagement::toString(typeclass), typeclass);
|
||||
mUi->m_ltsComboBox_typeClass->addItem(ParticipantManagement::toString(typeclass), static_cast<int>(typeclass));
|
||||
|
||||
slotClassTypeChanged();
|
||||
|
||||
@@ -68,21 +68,21 @@ void MappingDialog::slotClassTypeChanged()
|
||||
{
|
||||
mUi->m_ltsComboBox_type->clear();
|
||||
|
||||
int currentClass = mUi->m_ltsComboBox_typeClass->currentData().toInt();
|
||||
ParticipantManagement::TypeClass currentClass = static_cast<ParticipantManagement::TypeClass>(mUi->m_ltsComboBox_typeClass->currentData().toInt());
|
||||
|
||||
for (const ParticipantManagement::Type &type : std::as_const(m_mapTypes))
|
||||
{
|
||||
if (type.typeClass() != currentClass)
|
||||
if (type.typeClass != currentClass)
|
||||
continue;
|
||||
|
||||
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities().size() == 0))
|
||||
if (!m_offerDatabaseEntriesWithoutDISType && (type.disEntities.size() == 0))
|
||||
{
|
||||
|
||||
WARNING_LOG(mLogger) << "Type id " << type.id() << " does not have assigned DIS types! Type cannot be used when importing MSDL data!";
|
||||
WARNING_LOG(mLogger) << "Type id " << type.id << " does not have assigned DIS types! Type cannot be used when importing MSDL data!";
|
||||
continue;
|
||||
}
|
||||
|
||||
mUi->m_ltsComboBox_type->addItem(QString::fromStdString(type.name()), type.id());
|
||||
mUi->m_ltsComboBox_type->addItem(QString::fromStdString(type.name), type.id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,6 +122,6 @@ bool MappingDialog::autoMapAllUnmappedElements() const
|
||||
int32_t MappingDialog::getMappedTypeId() const
|
||||
{
|
||||
int index = mUi->m_ltsComboBox_type->currentData().toInt();
|
||||
return m_mapTypes[index].id();
|
||||
return m_mapTypes[index].id;
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -3,7 +3,7 @@
|
||||
#include "ppm_msdl_edit.h"
|
||||
#include "ui_ppm_msdl_edit.h"
|
||||
#include "msdl/msdl_import.h"
|
||||
#include "msdl_export.h"
|
||||
#include "msdl/msdl_export.h"
|
||||
|
||||
#include <QtGui/QAction>
|
||||
#include <AdvancedSymbology/asb_data_plugin_interface.h>
|
||||
@@ -18,6 +18,7 @@ namespace ParticipantManagement
|
||||
{
|
||||
MSDLEdit::MSDLEdit(LtsSession::LtsSession *session, QWidget *parent)
|
||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
|
||||
, m_logger(getLogger("MSDLEdit"))
|
||||
, m_actionRemove(nullptr)
|
||||
, m_actionEdit(nullptr)
|
||||
, m_ppmDtc(nullptr)
|
||||
|
||||
Reference in new issue
Block a user