Complete Qt6 migration: full clean build green across groups G1-G12 incl. runtime plugin set
new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
This commit is contained in:
1718 files changed
+126739
-18495
No files matched your search
+5
-3
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <LtsSession/lts_session.h>
|
||||
#include <LtsPrinting/printing.h>
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <QtWidgets/QTreeView>
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
@@ -21,6 +22,7 @@ namespace InfrastructureManagement
|
||||
|
||||
ExerciseAssignmentDialog::ExerciseAssignmentDialog(LtsSession::LtsSession *session, QWidget *parent)
|
||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_session(session)
|
||||
, m_ui(new Ui::ExerciseAssignmentDialog)
|
||||
, m_ismDtc(nullptr)
|
||||
@@ -76,7 +78,7 @@ bool ExerciseAssignmentDialog::init(const std::shared_ptr<Interface::Dtc> &ismDt
|
||||
const QMap<qint32, ExerciseManagement::Exercise> exercises = m_exmDtc->exercises();
|
||||
m_ui->cbExercises->addItem(QStringLiteral("-"), 0);
|
||||
for (const auto &exercise : exercises)
|
||||
m_ui->cbExercises->addItem(QString::fromStdString(exercise.name()), exercise.id());
|
||||
m_ui->cbExercises->addItem(QString::fromStdString(exercise.name), exercise.id);
|
||||
|
||||
m_ui->pbAssigned->setEnabled(false);
|
||||
|
||||
@@ -118,14 +120,14 @@ void ExerciseAssignmentDialog::onAssignedClicked()
|
||||
MainStructureElement &req = request;
|
||||
req = m_model->getRowData(index.row());
|
||||
|
||||
QJsonObject obj = QJsonDocument::fromJson(QByteArray::fromStdString(request.properties())).object();
|
||||
QJsonObject obj = QJsonDocument::fromJson(QByteArray::fromStdString(request.properties)).object();
|
||||
|
||||
|
||||
QJsonArray array;
|
||||
if (m_ui->cbExercises->currentIndex() != 0)
|
||||
array.push_back(m_ui->cbExercises->currentData().toInt());
|
||||
obj.insert(QStringLiteral("available_in_exercise"), array);
|
||||
request.properties(QJsonDocument(obj).toJson(QJsonDocument::Compact).toStdString());
|
||||
request.properties = QJsonDocument(obj).toJson(QJsonDocument::Compact).toStdString();
|
||||
|
||||
return m_ismFtc->mainStructureElementModifyRequest(request, this);
|
||||
|
||||
|
||||
+9
-7
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "ism_exercise_assignment_dialog_model.h"
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
@@ -16,6 +17,7 @@ ExerciseAssignmentDialogModel::ExerciseAssignmentDialogModel(QObject *parent)
|
||||
tr("Assigned Exercise")
|
||||
},
|
||||
parent)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_dtc(nullptr)
|
||||
, m_exmDtc(nullptr)
|
||||
{
|
||||
@@ -35,19 +37,19 @@ QVariant ExerciseAssignmentDialogModel::data(const QModelIndex &index, int role)
|
||||
switch (index.column())
|
||||
{
|
||||
case NAME:
|
||||
return m_dtc->getBuildingDisplayName(currentMainStructureElement.id());
|
||||
return m_dtc->getBuildingDisplayName(currentMainStructureElement.id);
|
||||
case ASSIGNED_EXERCISES:
|
||||
{
|
||||
if (!currentMainStructureElement.properties().size())
|
||||
if (!currentMainStructureElement.properties.size())
|
||||
return QChar(QLatin1Char('-'));
|
||||
|
||||
QJsonParseError parseError;
|
||||
QJsonDocument doc = QJsonDocument::fromJson(QByteArray::fromStdString(currentMainStructureElement.properties()), &parseError);
|
||||
QJsonDocument doc = QJsonDocument::fromJson(QByteArray::fromStdString(currentMainStructureElement.properties), &parseError);
|
||||
|
||||
if (parseError.error != QJsonParseError::NoError)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Could not parse JSON props of building with ID "
|
||||
<< currentMainStructureElement.id()
|
||||
<< currentMainStructureElement.id
|
||||
<< ". Reason: "
|
||||
<< parseError.errorString()
|
||||
<< "; JSON: "
|
||||
@@ -68,7 +70,7 @@ QVariant ExerciseAssignmentDialogModel::data(const QModelIndex &index, int role)
|
||||
if (exercise.size())
|
||||
{
|
||||
int exId = exercise.toInt();
|
||||
return QString::fromStdString(m_exmDtc->exercise(exId).name());
|
||||
return QString::fromStdString(m_exmDtc->exercise(exId).name);
|
||||
}
|
||||
return QChar(QLatin1Char('-'));
|
||||
}
|
||||
@@ -110,7 +112,7 @@ bool ExerciseAssignmentDialogModel::initModel(const std::shared_ptr<Interface::D
|
||||
bool ExerciseAssignmentDialogModel::isFiltered(const InfrastructureManagement::MainStructureElement &data, DataModification modType) const
|
||||
{
|
||||
Q_UNUSED(modType);
|
||||
return (data.structureElementTypeId() != InfrastructureManagement::StructureElementType::Building &&
|
||||
data.structureElementTypeId() != InfrastructureManagement::StructureElementType::Announcement);
|
||||
return (data.structureElementTypeId != InfrastructureManagement::StructureElementType::Building &&
|
||||
data.structureElementTypeId != InfrastructureManagement::StructureElementType::Announcement);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user