Enable Codification/OHP/PlanEditor/OrgChart plugin groups (G12 225); harden new_docker_build.sh
First-build fixes (DDS members, Qt6 transitive WebChannel/PrintSupport drops, logger init, Qt5 guard); script: log_warn, BUILD_WLS default ON, Poppler image+APT, XmlPatterns 6.0 wording
This commit is contained in:
11 files changed
+278
-61
No files matched your search
+7
-7
@@ -64,20 +64,20 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
||||
for (const ParticipantManagement::Party& party : std::as_const(userVisibleParties))
|
||||
{
|
||||
|
||||
if (party.id() != 2 && party.id() != 3)
|
||||
if (party.id != 2 && party.id != 3)
|
||||
continue;
|
||||
|
||||
QString partyName;
|
||||
if (party.id() == 2)
|
||||
if (party.id == 2)
|
||||
partyName = tr("OPFOR:");
|
||||
else if (party.id() == 3)
|
||||
else if (party.id == 3)
|
||||
partyName = tr("BLUFOR:");
|
||||
else
|
||||
partyName = ParticipantManagement::trPartyName(party.name());
|
||||
partyName = ParticipantManagement::trPartyName(party.name);
|
||||
m_ui->partyLayout->addWidget(new QLabel(partyName, this), i, 0, 1, 1);
|
||||
|
||||
LtsWidgets::LtsComboBox* cb = new LtsWidgets::LtsComboBox(this);
|
||||
cb->setProperty(QLatin1String("partyId").data(), party.id());
|
||||
cb->setProperty(QLatin1String("partyId").data(), party.id);
|
||||
m_tableVec.append(cb);
|
||||
cb->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
|
||||
cb->addItem(QStringLiteral("---"), 0);
|
||||
@@ -88,7 +88,7 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
||||
m_model->data(m_model->index(row, CodificationDataOverviewModel::Id), Qt::DisplayRole));
|
||||
|
||||
DEBUG_LOG(m_logger)
|
||||
<< "Init Combobox[" << row << "]: PartyId: " << party.id() << " Identifier: "
|
||||
<< "Init Combobox[" << row << "]: PartyId: " << party.id << " Identifier: "
|
||||
<< m_model->data(m_model->index(row, CodificationDataOverviewModel::Identifier), Qt::DisplayRole)
|
||||
.toString()
|
||||
<< " CodTabId: "
|
||||
@@ -105,7 +105,7 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
||||
.toInt();
|
||||
DEBUG_LOG(m_logger) << "Assignment[" << row << "]: assignedPartyId: " << assignedPartyId;
|
||||
|
||||
if (party.id() == assignedPartyId)
|
||||
if (party.id == assignedPartyId)
|
||||
{
|
||||
tableId =
|
||||
m_model->data(m_model->index(row, CodificationDataOverviewModel::Id), Qt::DisplayRole).toInt();
|
||||
|
||||
@@ -91,7 +91,10 @@ ADD_INTERFACE_LIBRARY(PpmDataPluginInterface
|
||||
svcPpmCommon
|
||||
)
|
||||
|
||||
IF(Qt5WebEngineWidgets_VERSION VERSION_GREATER 5.7.9)
|
||||
# Qt6 Migration: legacy guarded on Qt5WebEngineWidgets_VERSION > 5.7.9; the
|
||||
# Qt6 equivalent is that the Qt6::WebEngineWidgets target exists (consumer
|
||||
# plugins are additionally gated by BUILD_PLUGINS_PARTICIPANT_ORG_CHART).
|
||||
IF(TARGET Qt6::WebEngineWidgets)
|
||||
#
|
||||
# Combat Power Gui Plugin Interface
|
||||
#
|
||||
|
||||
+3
@@ -44,6 +44,9 @@ if(QT6_GUI_AVAILABLE)
|
||||
${Qt6_Widgets}
|
||||
Qt6::WebEngineCore
|
||||
Qt6::WebEngineWidgets
|
||||
# Qt6 Migration: Qt5::WebEngineWidgets transitively linked Qt5::WebChannel;
|
||||
# Qt6 dropped that dependency, so link the module explicitly.
|
||||
Qt6::WebChannel
|
||||
LtsSession
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
|
||||
+17
-16
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "participant_org_chart.h"
|
||||
#include "ui_participant_org_chart.h"
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <QtWebEngineCore/QWebEngineSettings>
|
||||
|
||||
#include <Symbology/symbol_data_to_render_role.h>
|
||||
@@ -16,9 +17,9 @@ namespace ParticipantManagement
|
||||
inline bool compareState(const StateInformation &a,
|
||||
const StateInformation &b)
|
||||
{
|
||||
if (a.stateTime() != b.stateTime())
|
||||
return a.stateTime() < b.stateTime();
|
||||
return a.vulnerabilityState() < b.vulnerabilityState();
|
||||
if (a.stateTime != b.stateTime)
|
||||
return a.stateTime < b.stateTime;
|
||||
return a.vulnerabilityState < b.vulnerabilityState;
|
||||
}
|
||||
|
||||
LtsParticipantsOrgChart::LtsParticipantsOrgChart(QWidget *parent)
|
||||
@@ -32,6 +33,7 @@ LtsParticipantsOrgChart::LtsParticipantsOrgChart(QWidget *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_asbItc(nullptr)
|
||||
, m_ui(new Ui::LtsParticipantsOrgChart)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
@@ -137,16 +139,16 @@ void LtsParticipantsOrgChart::loadParty(int partyId)
|
||||
|
||||
for (const ParticipantManagement::Participant &part : participantMap)
|
||||
{
|
||||
if (part.isDeleted() || part.partyId() != m_partyId)
|
||||
if (part.isDeleted || part.partyId != m_partyId)
|
||||
continue;
|
||||
if (part.superiorId() == 0)
|
||||
if (part.superiorId == 0)
|
||||
{
|
||||
root = part;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (root.inferiorIds().size() == 0)
|
||||
if (root.inferiorIds.size() == 0)
|
||||
{
|
||||
m_dataSource = preDefThing;
|
||||
m_ui->wevOrgChart->reload();
|
||||
@@ -166,10 +168,10 @@ void LtsParticipantsOrgChart::loadParty(int partyId)
|
||||
connect(m_participantOrgChart_MimeDataHelper.data(), &ParticipantOrgChart_MimeDataHelper::finished,
|
||||
this, &LtsParticipantsOrgChart::onParticipantOrgChart_MimeDataHelperFinished);
|
||||
|
||||
m_participantOrgChart_MimeDataHelper->run(root.id(),
|
||||
m_participantOrgChart_MimeDataHelper->run(root.id,
|
||||
false,
|
||||
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role()),
|
||||
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color())),
|
||||
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role),
|
||||
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color)),
|
||||
m_useSymData);
|
||||
}
|
||||
|
||||
@@ -231,10 +233,10 @@ bool LtsParticipantsOrgChart::loadTemplate(int templateRootId)
|
||||
connect(m_participantOrgChart_MimeDataHelper.data(), &ParticipantOrgChart_MimeDataHelper::finished,
|
||||
this, &LtsParticipantsOrgChart::onParticipantOrgChart_MimeDataHelperFinished);
|
||||
|
||||
m_participantOrgChart_MimeDataHelper->run(root.templateId(),
|
||||
m_participantOrgChart_MimeDataHelper->run(root.templateId,
|
||||
false,
|
||||
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role()),
|
||||
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color())),
|
||||
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role),
|
||||
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color)),
|
||||
false);
|
||||
|
||||
return true;
|
||||
@@ -258,8 +260,8 @@ void LtsParticipantsOrgChart::updateParticipant(int participantId)
|
||||
|
||||
helper->run(participantId,
|
||||
true,
|
||||
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role()),
|
||||
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color())),
|
||||
AdvancedSymbology::roleToRole<>(m_dtc->party(m_partyId).role),
|
||||
QColor::fromRgb(QRgb(m_dtc->party(m_partyId).color)),
|
||||
m_useSymData);
|
||||
}
|
||||
|
||||
@@ -301,8 +303,7 @@ void LtsParticipantsOrgChart::getWholeHierarchy()
|
||||
WebNofitifier::WebNofitifier(QObject *parent) : QObject(parent)
|
||||
, m_currentJsonString(QString())
|
||||
, m_updateString(QString())
|
||||
, m_updateTimer(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_updateTimer(new QTimer(this)) {
|
||||
connect(m_updateTimer, &QTimer::timeout, this, &WebNofitifier::onTimerTick);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -97,7 +97,6 @@ signals:
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_partyId;
|
||||
bool m_useSymData;
|
||||
bool m_isMenuEnabled;
|
||||
@@ -114,6 +113,8 @@ NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asbItc;
|
||||
Ui::LtsParticipantsOrgChart *m_ui;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -75,6 +75,9 @@ if(QT6_GUI_AVAILABLE)
|
||||
LtsSessionData
|
||||
NGLLogger
|
||||
Qt6::Xml
|
||||
# Qt6 Migration: Qt5::WebEngineWidgets transitively linked Qt5::PrintSupport
|
||||
# (plan_editor.cpp includes <QtPrintSupport/QPrintDialog>); Qt6 dropped that.
|
||||
Qt6::PrintSupport
|
||||
ngltranslator
|
||||
|
||||
PUBLIC
|
||||
|
||||
+29
-29
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <LtsUtils/LtsUtilsGui/LtsUtilsGuiDds/request_helper.h>
|
||||
|
||||
#include <flm_data_plugin_interface.h>
|
||||
#include <Plugins/FileManagement/flm_data_plugin_interface.h>
|
||||
#include <FileManagement/flm_explorer_gui_plugin_interface.h>
|
||||
|
||||
#include <ParticipantManagement/ppm_data_plugin_interface.h>
|
||||
@@ -475,9 +475,9 @@ bool InterfaceImpl::fmsCreatePlan(bool clearGeometryModel)
|
||||
|
||||
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
||||
|
||||
m_internal->m_currentFolderId = fc.folderId();
|
||||
m_internal->m_currentFolderId = fc.folderId;
|
||||
m_internal->m_currentFileId = fileId;
|
||||
m_internal->m_currentNameOfPlan = QString::fromStdString(fc.name());
|
||||
m_internal->m_currentNameOfPlan = QString::fromStdString(fc.name);
|
||||
|
||||
QFileInfo fileInfo(m_internal->m_currentNameOfPlan);
|
||||
m_internal->m_planEditor->setNameOfPlan(fileInfo.baseName());
|
||||
@@ -511,7 +511,7 @@ bool InterfaceImpl::fmsModifyPlan(int fileId, bool saveAs)
|
||||
}
|
||||
|
||||
FileManagement::FileContent fileContent = m_internal->m_flmDtc->fileContent(fileId);
|
||||
bool differentUser = fileContent.operatorId() != LtsSessionData::LtsSessionData::getInstance()->getOperatorId();
|
||||
bool differentUser = fileContent.operatorId != LtsSessionData::LtsSessionData::getInstance()->getOperatorId();
|
||||
|
||||
if (saveAs || differentUser)
|
||||
{
|
||||
@@ -527,8 +527,8 @@ bool InterfaceImpl::fmsModifyPlan(int fileId, bool saveAs)
|
||||
}
|
||||
|
||||
|
||||
QString nameOfPlan = QString::fromStdString(fileContent.name());
|
||||
m_internal->m_currentFolderId = fileContent.folderId();
|
||||
QString nameOfPlan = QString::fromStdString(fileContent.name);
|
||||
m_internal->m_currentFolderId = fileContent.folderId;
|
||||
m_internal->m_currentNameOfPlan = nameOfPlan;
|
||||
m_internal->m_currentFileId = fileId;
|
||||
|
||||
@@ -592,7 +592,7 @@ void InterfaceImpl::fmsReadPlan()
|
||||
m_internal->m_planEditor->onPlanReset();
|
||||
|
||||
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
||||
QString nameOfPlan = QString::fromStdString(fc.name());
|
||||
QString nameOfPlan = QString::fromStdString(fc.name);
|
||||
|
||||
if (content.size() == 0)
|
||||
{
|
||||
@@ -606,8 +606,8 @@ void InterfaceImpl::fmsReadPlan()
|
||||
m_internal->m_planEditor->setPlan(content);
|
||||
|
||||
m_internal->m_currentNameOfPlan = nameOfPlan;
|
||||
m_internal->m_currentFolderId = fc.folderId();
|
||||
m_internal->m_currentFileId = fc.id();
|
||||
m_internal->m_currentFolderId = fc.folderId;
|
||||
m_internal->m_currentFileId = fc.id;
|
||||
|
||||
QFileInfo fileInfo(m_internal->m_currentNameOfPlan);
|
||||
m_internal->m_planEditor->setNameOfPlan(fileInfo.baseName());
|
||||
@@ -650,7 +650,7 @@ void InterfaceImpl::fmsImportPlan()
|
||||
if (fileId > 0)
|
||||
{
|
||||
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
||||
QString nameOfPlan = QString::fromStdString(fc.name());
|
||||
QString nameOfPlan = QString::fromStdString(fc.name);
|
||||
if (content.size() == 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error plan [" << nameOfPlan << "] is empty";
|
||||
@@ -690,7 +690,7 @@ bool InterfaceImpl::fmsWritePlan(bool saveAs)
|
||||
|
||||
FileManagement::FileContent planFileContent;
|
||||
if (m_internal->m_flmDtc->getFile(FileManagement::FileType::TacticalPlan, m_internal->m_currentFolderId, m_internal->m_currentNameOfPlan, planFileContent))
|
||||
m_internal->m_currentFileId = planFileContent.id();
|
||||
m_internal->m_currentFileId = planFileContent.id;
|
||||
}
|
||||
|
||||
if (saveAs || (m_internal->m_currentFileId <= 0))
|
||||
@@ -726,7 +726,7 @@ void InterfaceImpl::fmsDeletePlan()
|
||||
if (fileId > 0)
|
||||
{
|
||||
FileManagement::FileContent fc = m_internal->m_flmDtc->fileContent(fileId);
|
||||
QString nameOfPlan = QString::fromStdString(fc.name());
|
||||
QString nameOfPlan = QString::fromStdString(fc.name);
|
||||
|
||||
LtsWidgets::Button doIt = LtsWidgets::LtsMessageDialog::showMessage(
|
||||
m_session->baseLayout()
|
||||
@@ -753,7 +753,7 @@ void InterfaceImpl::fmsDeletePlan()
|
||||
|
||||
void InterfaceImpl::onPlanContentChanged(const FileManagement::FileContent &data, DataModification modType)
|
||||
{
|
||||
if (data.fileType() != FileManagement::FileType::TacticalPlan)
|
||||
if (data.fileType != FileManagement::FileType::TacticalPlan)
|
||||
return;
|
||||
|
||||
switch (modType)
|
||||
@@ -761,7 +761,7 @@ void InterfaceImpl::onPlanContentChanged(const FileManagement::FileContent &data
|
||||
case DataModification::eModified :
|
||||
break;
|
||||
case DataModification::eRemoved :
|
||||
if (m_internal->m_currentFileId == data.id())
|
||||
if (m_internal->m_currentFileId == data.id)
|
||||
m_internal->m_currentFileId = -1;
|
||||
break;
|
||||
|
||||
@@ -780,7 +780,7 @@ void InterfaceImpl::onIterateParticipantsSidc()
|
||||
|
||||
auto gatherUpSidc = [&participantSidcsInUse](const ParticipantManagement::Participant & data)
|
||||
{
|
||||
const QString &sidcCode = QString::fromStdString(data.symbol());
|
||||
const QString &sidcCode = QString::fromStdString(data.symbol);
|
||||
|
||||
if (AdvancedSymbology::SidcCodec::isEncoded(sidcCode))
|
||||
{
|
||||
@@ -822,7 +822,7 @@ void InterfaceImpl::readSymbolFavouritesRequest(const QString &favName, QString
|
||||
return;
|
||||
}
|
||||
|
||||
int fileId = fileContent.id();
|
||||
int fileId = fileContent.id;
|
||||
QByteArray content;
|
||||
|
||||
if (!m_internal->m_flmGui->loadContent(fileId, content, true))
|
||||
@@ -929,23 +929,23 @@ void InterfaceImpl::storeSymbolFavouritesRequest(const QString &favName, const Q
|
||||
LtsWidgets::LtsMessageDialog::showMessage(m_session->baseLayout(), msg, m_internal->m_messageBoxTitle);
|
||||
return;
|
||||
}
|
||||
if (!m_internal->m_flmGui->saveContent(favContent.id(), favXMLContent.toUtf8(), QString()))
|
||||
if (!m_internal->m_flmGui->saveContent(favContent.id, favXMLContent.toUtf8(), QString()))
|
||||
ERROR_LOG(m_logger) << "Cannot save symbol favourites in library";
|
||||
}
|
||||
else
|
||||
{
|
||||
favContent.name(favName.toStdString());
|
||||
favContent.isTemplate(false);
|
||||
favContent.isUsedBy(false);
|
||||
favContent.usedBy(0);
|
||||
favContent.folderId(folderId);
|
||||
favContent.fileStatus(FileManagement::FileStatus::Valid);
|
||||
favContent.fileCategory(FileManagement::FileCategory::Global);
|
||||
favContent.fileType(FileManagement::FileType::OperatorFavourite);
|
||||
favContent.exerciseId();
|
||||
favContent.phaseId();
|
||||
favContent.lastModified(QDateTime::currentMSecsSinceEpoch());
|
||||
favContent.operatorId(LtsSessionData::LtsSessionData::getInstance()->getOperatorId());
|
||||
favContent.name = favName.toStdString();
|
||||
favContent.isTemplate = false;
|
||||
favContent.isUsedBy = false;
|
||||
favContent.usedBy = 0;
|
||||
favContent.folderId = folderId;
|
||||
favContent.fileStatus = FileManagement::FileStatus::Valid;
|
||||
favContent.fileCategory = FileManagement::FileCategory::Global;
|
||||
favContent.fileType = FileManagement::FileType::OperatorFavourite;
|
||||
favContent.exerciseId = 0;
|
||||
favContent.phaseId = 0;
|
||||
favContent.lastModified = QDateTime::currentMSecsSinceEpoch();
|
||||
favContent.operatorId = LtsSessionData::LtsSessionData::getInstance()->getOperatorId();
|
||||
|
||||
|
||||
ERROR_LOG(m_logger) << "New file content = " << favXMLContent;
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Lts/Common/ProjectConfig/project_defines.h>
|
||||
#include <PlanEditor/PlanEditorPlugin/plan_editor_gui_plugin_interface.h>
|
||||
#include <flm_data_plugin_interface.h>
|
||||
#include <Plugins/FileManagement/flm_data_plugin_interface.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
|
||||
Reference in new issue
Block a user