Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
-1
@@ -24,7 +24,6 @@ ShootbackTargetModel::ShootbackTargetModel(QObject *parent)
|
||||
tr("Is Used")},
|
||||
parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_logger(getLogger("ShootbackTargetModel"))
|
||||
{}
|
||||
|
||||
bool ShootbackTargetModel::initModel(const std::shared_ptr<TargetManagement::Interface::Dtc> &dtc)
|
||||
|
||||
-1
@@ -50,6 +50,5 @@ protected:
|
||||
}
|
||||
private:
|
||||
std::shared_ptr<TargetManagement::Interface::Dtc> m_dtc;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
-1
@@ -18,7 +18,6 @@ ShootbackTargetView::ShootbackTargetView(const QString &menuGroup, LtsSession::L
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_session(session)
|
||||
, m_ui(new Ui::ShootbackTargetView)
|
||||
, m_logger(getLogger("ShootbackTargetView"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->widget->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
|
||||
-2
@@ -56,8 +56,6 @@ private:
|
||||
|
||||
LtsSession::LtsSession *m_session{nullptr};
|
||||
Ui::ShootbackTargetView *m_ui{nullptr};
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+10
-11
@@ -28,7 +28,6 @@ AreaDialog::AreaDialog(const QString &menuGroup, LtsSession::LtsSession *session
|
||||
, m_ui(new Ui::AreaDialog)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("AreaDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -56,7 +55,7 @@ bool AreaDialog::init()
|
||||
return false;
|
||||
|
||||
|
||||
INFO_LOG(m_logger) << "AreaDialog::init";
|
||||
INFO_LOG() << "AreaDialog::init";
|
||||
m_areaModel = new AreaModel(this);
|
||||
m_areaModel->initModel(m_dtc);
|
||||
|
||||
@@ -140,13 +139,13 @@ void AreaDialog::keyPressEvent(QKeyEvent *event)
|
||||
|
||||
void AreaDialog::onNewArea()
|
||||
{
|
||||
INFO_LOG(m_logger) << "onNewArea";
|
||||
INFO_LOG() << "onNewArea";
|
||||
|
||||
AreaEdit *dialog = new AreaEdit(this);
|
||||
|
||||
if (!dialog->init(m_dtc, m_ftc, m_sitMapGuiIfc, m_areaModel))
|
||||
{
|
||||
ERROR_LOG(m_logger) << QLatin1String("Can't initialize AreaEdit!");
|
||||
ERROR_LOG() << QLatin1String("Can't initialize AreaEdit!");
|
||||
delete dialog;
|
||||
return;
|
||||
}
|
||||
@@ -176,7 +175,7 @@ void AreaDialog::onEditArea()
|
||||
const QModelIndex curIdx = selectedRows.first();
|
||||
if (!curIdx.isValid())
|
||||
return;
|
||||
INFO_LOG(m_logger) << " onEditTargetPart";
|
||||
INFO_LOG() << " onEditTargetPart";
|
||||
|
||||
AreaEdit *dialog = new AreaEdit(this);
|
||||
|
||||
@@ -184,7 +183,7 @@ void AreaDialog::onEditArea()
|
||||
|
||||
if (!dialog->init(m_dtc, m_ftc, m_sitMapGuiIfc, m_areaModel, area))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << QLatin1String("Can't initialize AreaEdit!");
|
||||
ERROR_LOG() << Q_FUNC_INFO << QLatin1String("Can't initialize AreaEdit!");
|
||||
delete dialog;
|
||||
return;
|
||||
}
|
||||
@@ -219,7 +218,7 @@ QByteArray AreaDialog::toJson() const
|
||||
|
||||
QJsonDocument doc(obj);
|
||||
|
||||
DEBUG_LOG(m_logger) << " json = " << doc.toJson();
|
||||
DEBUG_LOG() << " json = " << doc.toJson();
|
||||
|
||||
return doc.toJson(QJsonDocument::Compact);
|
||||
}
|
||||
@@ -260,9 +259,9 @@ void AreaDialog::onExportButtonClicked()
|
||||
QByteArray byteArray = toJson();
|
||||
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
|
||||
if (fileId > 0)
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << "Saved file with id = " << fileId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << "Saved file with id = " << fileId;
|
||||
else
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << "Could not save file in library ";
|
||||
ERROR_LOG() << Q_FUNC_INFO << "Could not save file in library ";
|
||||
}
|
||||
|
||||
void AreaDialog::onImportButtonClicked()
|
||||
@@ -283,7 +282,7 @@ void AreaDialog::onImportButtonClicked()
|
||||
|
||||
void AreaDialog::onImport()
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "--- onImportButtonClicked() ";
|
||||
INFO_LOG() << Q_FUNC_INFO << "--- onImportButtonClicked() ";
|
||||
|
||||
QByteArray content;
|
||||
int fileId = m_flmGui->loadFileContent(this, content, {FileManagement::FileType::Xml},
|
||||
@@ -319,7 +318,7 @@ void AreaDialog::onImport()
|
||||
const QVector<TargetManagement::ShootbackArea> vecDataCandidate(fromJson(content));
|
||||
for (ShootbackArea area : vecDataCandidate)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "area " <<area;
|
||||
DEBUG_LOG() << "area " <<area;
|
||||
|
||||
area.id(0);
|
||||
m_requestHelper->addRequest([this, area]()
|
||||
|
||||
+3
-4
@@ -15,7 +15,6 @@ AreaEdit::AreaEdit(QWidget *parent)
|
||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_ui(new Ui::AreaEdit)
|
||||
, m_logger(getLogger("AreaEdit"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -45,11 +44,11 @@ bool AreaEdit::init(const std::shared_ptr<TargetManagement::Interface::Dtc> &dtc
|
||||
AreaModel *areaModel,
|
||||
const ShootbackArea &area)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AreaEdit::init()";
|
||||
DEBUG_LOG() << "AreaEdit::init()";
|
||||
|
||||
if (!dtc || !ftc || !sitMapGuiIfc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "AreaEdit::init() Invalid shared_ptr!";
|
||||
ERROR_LOG() << "AreaEdit::init() Invalid shared_ptr!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -123,7 +122,7 @@ void AreaEdit::onRectData(const QPointF ¢erPoint, double width, double heigh
|
||||
m_ui->positionEdit->setCoordinate(centerPoint);
|
||||
m_ui->sbWidth->setValue(width);
|
||||
m_ui->sbHeight->setValue(height);
|
||||
DEBUG_LOG(m_logger) << "Pos X: " << centerPoint.x() << " Y: " << centerPoint.y() << " W: " << width << " H: " << height;
|
||||
DEBUG_LOG() << "Pos X: " << centerPoint.x() << " Y: " << centerPoint.y() << " W: " << width << " H: " << height;
|
||||
|
||||
showPreviewObject();
|
||||
}
|
||||
|
||||
+2
-3
@@ -30,7 +30,6 @@ AreaModel::AreaModel(QObject *parent)
|
||||
tr("Height"),
|
||||
},
|
||||
parent)
|
||||
, m_logger(getLogger("AreaModel"))
|
||||
{}
|
||||
|
||||
|
||||
@@ -40,7 +39,7 @@ bool AreaModel::initModel(const std::shared_ptr<TargetManagement::Interface::Dtc
|
||||
|
||||
|
||||
const QMap<qint32, TargetManagement::ShootbackArea> areas = m_tgt_dtc->shootbackAreas();
|
||||
INFO_LOG(m_logger) << "initModel - #AreaModel: " << areas.size();
|
||||
INFO_LOG() << "initModel - #AreaModel: " << areas.size();
|
||||
|
||||
connect(m_tgt_dtc.get(), &Interface::Dtc::shootbackAreaChanged,
|
||||
this, &AreaModel::onShootbackAreaChanged);
|
||||
@@ -89,7 +88,7 @@ QVariant AreaModel::headerData(int section, Qt::Orientation orientation, int rol
|
||||
|
||||
QVariant AreaModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " role=" << role
|
||||
INFO_LOG() << Q_FUNC_INFO << " role=" << role
|
||||
<< " index = " << index.column();
|
||||
|
||||
if (!indexIsValid(index))
|
||||
|
||||
+9
-10
@@ -73,7 +73,6 @@ AssignmentParticipantModel::AssignmentParticipantModel(QObject *parent)
|
||||
tr("Effect_2")
|
||||
},
|
||||
parent)
|
||||
, m_logger(getLogger("AssignmentParticipantModel"))
|
||||
{}
|
||||
|
||||
|
||||
@@ -97,7 +96,7 @@ bool AssignmentParticipantModel::initModel(const std::shared_ptr<TargetManagemen
|
||||
|
||||
|
||||
const QMap<qint32, TargetManagement::TargetAreaAssignment> targetAreaAssignments = m_tgt_dtc->targetAreaAssignments();
|
||||
INFO_LOG(m_logger) << "initModel - #targetAreaAssignments.size(): " << targetAreaAssignments.size();
|
||||
INFO_LOG() << "initModel - #targetAreaAssignments.size(): " << targetAreaAssignments.size();
|
||||
|
||||
connect(m_tgt_dtc.get(), &Interface::Dtc::targetAreaAssignmentChanged,
|
||||
this, &AssignmentParticipantModel::onTargetAreaAssignmentChanged);
|
||||
@@ -106,7 +105,7 @@ bool AssignmentParticipantModel::initModel(const std::shared_ptr<TargetManagemen
|
||||
auto cb = [this](const TargetManagement::TargetAreaAssignment & d) { onTargetAreaAssignmentChanged(d, DataModification::eAdded); };
|
||||
m_tgt_dtc->targetAreaAssignments(cb);
|
||||
}
|
||||
INFO_LOG(m_logger) << "initModel - #targetAreaAssignments.size(): " << targetAreaAssignments.size() << " DONE";
|
||||
INFO_LOG() << "initModel - #targetAreaAssignments.size(): " << targetAreaAssignments.size() << " DONE";
|
||||
|
||||
|
||||
connect(this, &AssignmentParticipantModel::rowsInserted, this, &AssignmentParticipantModel::updateColumnFilter);
|
||||
@@ -211,7 +210,7 @@ QVariant handleIsDefault(const TargetManagement::TargetAreaAssignment &assignmen
|
||||
|
||||
QVariant AssignmentParticipantModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " role=" << role
|
||||
INFO_LOG() << Q_FUNC_INFO << " role=" << role
|
||||
<< " index = " << index.column();
|
||||
|
||||
if (!indexIsValid(index))
|
||||
@@ -466,7 +465,7 @@ int AssignmentParticipantModel::findRowForAreaTargetParticipantId(int areaId, in
|
||||
|
||||
void AssignmentParticipantModel::addGapFillerForArea(int areaId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START, areaId=" << areaId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START, areaId=" << areaId;
|
||||
|
||||
const QSet<int> &associatedParticipantIds = getAssociatedParticipantIdsForArea(areaId);
|
||||
|
||||
@@ -510,12 +509,12 @@ void AssignmentParticipantModel::addGapFillerForArea(int areaId)
|
||||
#endif
|
||||
|
||||
this->insertRows(gapFillers);
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " END, areaId=" << areaId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " END, areaId=" << areaId;
|
||||
}
|
||||
|
||||
void AssignmentParticipantModel::addGapFillerForTargetParticipantId(int targetParticipantId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START, targetParticipantId=" << targetParticipantId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START, targetParticipantId=" << targetParticipantId;
|
||||
|
||||
const QSet<int> &associatedAreaIds = getAssociatedAreasIdsForParticipantId(targetParticipantId);
|
||||
|
||||
@@ -536,19 +535,19 @@ void AssignmentParticipantModel::addGapFillerForTargetParticipantId(int targetPa
|
||||
m_tgt_dtc->shootbackAreas(cb);
|
||||
|
||||
this->insertRows(gapFillers);
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " END, targetParticipantId=" << targetParticipantId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " END, targetParticipantId=" << targetParticipantId;
|
||||
}
|
||||
|
||||
void AssignmentParticipantModel::onTargetAreaAssignmentChanged(const TargetManagement::TargetAreaAssignment &data,
|
||||
DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " modType=" << modType << " data=" << data;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " modType=" << modType << " data=" << data;
|
||||
|
||||
|
||||
if (modType == DataModification::eAdded)
|
||||
{
|
||||
int row = findRowForAreaTargetParticipantId(data.areaId(), data.targetParticipantId());
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " row=" << row;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " row=" << row;
|
||||
if (row >= 0)
|
||||
{
|
||||
setRowData(row, data);
|
||||
|
||||
+4
-5
@@ -17,7 +17,6 @@ namespace TargetManagement
|
||||
|
||||
ParticipantHandler::ParticipantHandler(QObject *parent)
|
||||
: BaseClass(parent)
|
||||
, m_logger(getLogger("ParticipantHandler"))
|
||||
{}
|
||||
|
||||
|
||||
@@ -88,7 +87,7 @@ QString ParticipantHandler::target_wmsTypeClassToString(const ParticipantManagem
|
||||
|
||||
void ParticipantHandler::onShootbackTargetChanged(const TargetManagement::ShootbackTarget &data, const DataModification modType)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onShootbackTargetChanged: " << data << ", " << modType;
|
||||
INFO_LOG() << "onShootbackTargetChanged: " << data << ", " << modType;
|
||||
|
||||
switch (modType)
|
||||
{
|
||||
@@ -105,7 +104,7 @@ void ParticipantHandler::onShootbackTargetChanged(const TargetManagement::Shootb
|
||||
void ParticipantHandler::onTypeChanged(const ParticipantManagement::Type &data,
|
||||
const DataModification modType)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onTypeChanged:" << data << ", " << modType;
|
||||
INFO_LOG() << "onTypeChanged:" << data << ", " << modType;
|
||||
|
||||
switch (modType)
|
||||
{
|
||||
@@ -122,7 +121,7 @@ void ParticipantHandler::onTypeChanged(const ParticipantManagement::Type &data,
|
||||
void ParticipantHandler::onParticipantChanged(const ParticipantManagement::Participant &data,
|
||||
DataModification modType)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "onParticipantChanged: " << data << ", " << modType;
|
||||
TRACE_LOG() << "onParticipantChanged: " << data << ", " << modType;
|
||||
|
||||
if (data.isDeleted())
|
||||
modType = DataModification::eRemoved;
|
||||
@@ -138,7 +137,7 @@ void ParticipantHandler::onParticipantChanged(const ParticipantManagement::Parti
|
||||
case DataModification::eModified:
|
||||
case DataModification::eAdded:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DataModification::eAdded Participant"
|
||||
DEBUG_LOG() << "DataModification::eAdded Participant"
|
||||
<< " Id=" << dataId
|
||||
<< " TypeId=" << data.typeId()
|
||||
<< " eqId=" << (data.equipmentNumber().is_set() ? data.equipmentNumber().get() : -1)
|
||||
|
||||
+2
-3
@@ -16,7 +16,6 @@ ShootbackTargetEdit::ShootbackTargetEdit(QWidget *parent)
|
||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_ui(new Ui::ShootbackTargetEdit)
|
||||
, m_logger(getLogger("ShootbackTargetEdit"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
@@ -38,11 +37,11 @@ bool ShootbackTargetEdit::init(const std::shared_ptr<TargetManagement::Interface
|
||||
TargetParticipantModel *targetParticipantModel,
|
||||
const TargetManagement::ShootbackTarget &target)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ShootbackTargetEdit::init()";
|
||||
DEBUG_LOG() << "ShootbackTargetEdit::init()";
|
||||
|
||||
if (!dtc || !ftc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "ShootbackTargetEdit::init() Invalid shared_ptr!";
|
||||
ERROR_LOG() << "ShootbackTargetEdit::init() Invalid shared_ptr!";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+20
-21
@@ -32,7 +32,6 @@ AssignmentDialog::AssignmentDialog(const QString &menuGroup, LtsSession::LtsSess
|
||||
, m_ui(new Ui::TargetAreaAssignmentsDialog)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("AssignmentDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -66,7 +65,7 @@ bool AssignmentDialog::init(MODE mode, int idAccordingToMode)
|
||||
return false;
|
||||
|
||||
|
||||
INFO_LOG(m_logger) << "AssignmentDialog::init";
|
||||
INFO_LOG() << "AssignmentDialog::init";
|
||||
m_assignmentParticipantModel = new AssignmentParticipantModel(this);
|
||||
m_assignmentParticipantModel->initModel(m_dtc, m_ppmDtc, m_ppmGuiCbxIfc, m_session);
|
||||
|
||||
@@ -247,13 +246,13 @@ void AssignmentDialog::keyPressEvent(QKeyEvent *event)
|
||||
|
||||
void AssignmentDialog::onNewAssignment()
|
||||
{
|
||||
INFO_LOG(m_logger) << "onNew";
|
||||
INFO_LOG() << "onNew";
|
||||
|
||||
AssignmentEditDialog *dialog = new AssignmentEditDialog(this);
|
||||
|
||||
if (!dialog->init(m_dtc, m_ftc, m_assignmentParticipantModel))
|
||||
{
|
||||
ERROR_LOG(m_logger) << QLatin1String("Can't initialize AssignmentEditDialog!");
|
||||
ERROR_LOG() << QLatin1String("Can't initialize AssignmentEditDialog!");
|
||||
delete dialog;
|
||||
return;
|
||||
}
|
||||
@@ -291,10 +290,10 @@ void AssignmentDialog::onEditAssignment()
|
||||
|
||||
const TargetAreaAssignment &assignment = m_assignmentParticipantModel->getRowData(curIdx.row());
|
||||
|
||||
DEBUG_LOG(m_logger) << " onEditTargetArea, row = " << curIdx.row() << ", assignment.id() = " << assignment.id();
|
||||
DEBUG_LOG() << " onEditTargetArea, row = " << curIdx.row() << ", assignment.id() = " << assignment.id();
|
||||
if (!dialog->init(m_dtc, m_ftc, m_assignmentParticipantModel, assignment))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << QLatin1String("Can't initialize ShootbackTarget!");
|
||||
ERROR_LOG() << Q_FUNC_INFO << QLatin1String("Can't initialize ShootbackTarget!");
|
||||
delete dialog;
|
||||
return;
|
||||
}
|
||||
@@ -309,7 +308,7 @@ void AssignmentDialog::onEditAssignment()
|
||||
|
||||
void AssignmentDialog::onUpdateItem(const TargetAreaAssignment &assignment)
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " got item to update, item=" << assignment;
|
||||
INFO_LOG() << Q_FUNC_INFO << " got item to update, item=" << assignment;
|
||||
|
||||
if (assignment.id()>0)
|
||||
{
|
||||
@@ -318,7 +317,7 @@ void AssignmentDialog::onUpdateItem(const TargetAreaAssignment &assignment)
|
||||
|
||||
QModelIndex mi = m_assignmentParticipantModel->findIndexForId(assignment.id());
|
||||
int row = mi.row();
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " got item to update, row=" << row;
|
||||
INFO_LOG() << Q_FUNC_INFO << " got item to update, row=" << row;
|
||||
if (row < 0)
|
||||
{
|
||||
abort();
|
||||
@@ -330,7 +329,7 @@ void AssignmentDialog::onUpdateItem(const TargetAreaAssignment &assignment)
|
||||
if (m_assignmentParticipantModel->getRowData(row) != assignment)
|
||||
{
|
||||
m_assignmentParticipantModel->setRowData(row, assignment);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " CHANGED CHANGED CHANGED CHANGED CHANGED, row = " << row;
|
||||
INFO_LOG() << Q_FUNC_INFO << " CHANGED CHANGED CHANGED CHANGED CHANGED, row = " << row;
|
||||
slotChangesMade();
|
||||
}
|
||||
}
|
||||
@@ -340,18 +339,18 @@ void AssignmentDialog::onUpdateItem(const TargetAreaAssignment &assignment)
|
||||
|
||||
|
||||
int row = m_assignmentParticipantModel->findRowForAreaTargetParticipantId(assignment.areaId(), assignment.targetParticipantId());
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " got item to update, row=" << row;
|
||||
INFO_LOG() << Q_FUNC_INFO << " got item to update, row=" << row;
|
||||
if (row < 0)
|
||||
{
|
||||
m_assignmentParticipantModel->insertRow(assignment);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " CHANGED CHANGED CHANGED CHANGED CHANGED";
|
||||
INFO_LOG() << Q_FUNC_INFO << " CHANGED CHANGED CHANGED CHANGED CHANGED";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_assignmentParticipantModel->getRowData(row) != assignment)
|
||||
{
|
||||
m_assignmentParticipantModel->setRowData(row, assignment);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " CHANGED CHANGED CHANGED CHANGED CHANGED, row = " << row;
|
||||
INFO_LOG() << Q_FUNC_INFO << " CHANGED CHANGED CHANGED CHANGED CHANGED, row = " << row;
|
||||
slotChangesMade();
|
||||
}
|
||||
}
|
||||
@@ -397,7 +396,7 @@ QByteArray AssignmentDialog::toJson() const
|
||||
}
|
||||
QJsonDocument doc(obj);
|
||||
|
||||
DEBUG_LOG(m_logger) << " json = " << doc.toJson();
|
||||
DEBUG_LOG() << " json = " << doc.toJson();
|
||||
|
||||
return doc.toJson(QJsonDocument::Compact);
|
||||
}
|
||||
@@ -441,7 +440,7 @@ QVector<TargetManagement::TargetAreaAssignment> AssignmentDialog::fromJson(const
|
||||
|
||||
bool AssignmentDialog::apply()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " APPLY";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " APPLY";
|
||||
|
||||
const QVector<TargetAreaAssignment> &assignments = m_assignmentParticipantModel->getData();
|
||||
for (const TargetAreaAssignment &updateCandidate : std::as_const(assignments))
|
||||
@@ -452,9 +451,9 @@ bool AssignmentDialog::apply()
|
||||
if (updateCandidate.isActive() && isDefault(updateCandidate.configuration()))
|
||||
{
|
||||
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " APPLY NOT ALLOWED - Invalid configuration provided for at least one active assignment";
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " APPLY NOT ALLOWED - Invalid configuration provided for at least one active assignment";
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " updateCandidate " << updateCandidate;
|
||||
ERROR_LOG() << Q_FUNC_INFO << " APPLY NOT ALLOWED - Invalid configuration provided for at least one active assignment";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " APPLY NOT ALLOWED - Invalid configuration provided for at least one active assignment";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " updateCandidate " << updateCandidate;
|
||||
|
||||
QMessageBox::warning(this, tr("No configuration"),
|
||||
tr("Invalid configuration provided for at least one active assignment.")
|
||||
@@ -469,7 +468,7 @@ bool AssignmentDialog::apply()
|
||||
bool isGapFiller = (assignmentId <= 0);
|
||||
if (!isEqual(curAssignment, updateCandidate, isGapFiller))
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " add request for: assignmentId:" << assignmentId
|
||||
INFO_LOG() << Q_FUNC_INFO << " add request for: assignmentId:" << assignmentId
|
||||
<< " name: " << QString::fromStdString(updateCandidate.name());
|
||||
m_requestHelper->addRequest([this, updateCandidate]()
|
||||
{
|
||||
@@ -494,14 +493,14 @@ void AssignmentDialog::onExportButtonClicked()
|
||||
QByteArray byteArray = toJson();
|
||||
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
|
||||
if (fileId > 0)
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << "Saved file with id = " << fileId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << "Saved file with id = " << fileId;
|
||||
else
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << "Could not save file in library ";
|
||||
ERROR_LOG() << Q_FUNC_INFO << "Could not save file in library ";
|
||||
}
|
||||
|
||||
void AssignmentDialog::onImportButtonClicked()
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "--- onImportButtonClicked() ";
|
||||
INFO_LOG() << Q_FUNC_INFO << "--- onImportButtonClicked() ";
|
||||
|
||||
QHash<LtsWidgets::Button, QString> buttonTexts;
|
||||
buttonTexts.insert(LtsWidgets::Button::Ok, tr("Overwrite"));
|
||||
|
||||
+2
-3
@@ -18,7 +18,6 @@ AssignmentEditDialog::AssignmentEditDialog(QWidget *parent)
|
||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_ui(new Ui::AssignmentEdit)
|
||||
, m_logger(getLogger("AssignmentEditDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
@@ -40,11 +39,11 @@ bool AssignmentEditDialog::init(const std::shared_ptr<TargetManagement::Interfac
|
||||
AssignmentParticipantModel *assignmentParticipantModel,
|
||||
const TargetManagement::TargetAreaAssignment &assignment)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AssignmentEditDialog::init(), assignment=" << assignment;
|
||||
DEBUG_LOG() << "AssignmentEditDialog::init(), assignment=" << assignment;
|
||||
|
||||
if (!dtc || !ftc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "AssignmentEditDialog::init() Invalid shared_ptr!";
|
||||
ERROR_LOG() << "AssignmentEditDialog::init() Invalid shared_ptr!";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+9
-10
@@ -32,7 +32,6 @@ TargetPartDialog::TargetPartDialog(const QString &menuGroup, LtsSession::LtsSess
|
||||
, m_ui(new Ui::TargetPartDialog)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("TargetPartDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -64,7 +63,7 @@ bool TargetPartDialog::init(TargetManagement::TargetPartDialog::MODE mode)
|
||||
return false;
|
||||
|
||||
|
||||
INFO_LOG(m_logger) << "TargetPartDialog::init";
|
||||
INFO_LOG() << "TargetPartDialog::init";
|
||||
m_targetParticipantModel = new TargetParticipantModel(this);
|
||||
m_targetParticipantModel->initModel(m_dtc, m_ppmDtc, m_ppmGuiCbxIfc, m_session);
|
||||
|
||||
@@ -190,13 +189,13 @@ void TargetPartDialog::retranslate()
|
||||
|
||||
void TargetPartDialog::onNewTargetPart()
|
||||
{
|
||||
INFO_LOG(m_logger) << "onNewTargetPart";
|
||||
INFO_LOG() << "onNewTargetPart";
|
||||
|
||||
ShootbackTargetEdit *dialog = new ShootbackTargetEdit(this);
|
||||
|
||||
if (!dialog->init(m_dtc, m_ftc, m_targetParticipantModel))
|
||||
{
|
||||
ERROR_LOG(m_logger) << QLatin1String("Can't initialize shootbackTargetEdit!");
|
||||
ERROR_LOG() << QLatin1String("Can't initialize shootbackTargetEdit!");
|
||||
delete dialog;
|
||||
return;
|
||||
}
|
||||
@@ -229,7 +228,7 @@ void TargetPartDialog::onEditTargetPart()
|
||||
const QModelIndex curIdx = selectedRows.first();
|
||||
if (!curIdx.isValid())
|
||||
return;
|
||||
INFO_LOG(m_logger) << " onEditTargetPart";
|
||||
INFO_LOG() << " onEditTargetPart";
|
||||
|
||||
ShootbackTargetEdit *dialog = new ShootbackTargetEdit(this);
|
||||
|
||||
@@ -237,7 +236,7 @@ void TargetPartDialog::onEditTargetPart()
|
||||
|
||||
if (!dialog->init(m_dtc, m_ftc, m_targetParticipantModel, tgt))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << QLatin1String("Can't initialize shootbackTargetEdit!");
|
||||
ERROR_LOG() << Q_FUNC_INFO << QLatin1String("Can't initialize shootbackTargetEdit!");
|
||||
delete dialog;
|
||||
return;
|
||||
}
|
||||
@@ -284,7 +283,7 @@ QByteArray TargetPartDialog::toJson() const
|
||||
}
|
||||
QJsonDocument doc(obj);
|
||||
|
||||
DEBUG_LOG(m_logger) << " json = " << doc.toJson();
|
||||
DEBUG_LOG() << " json = " << doc.toJson();
|
||||
|
||||
return doc.toJson(QJsonDocument::Compact);
|
||||
}
|
||||
@@ -331,9 +330,9 @@ void TargetPartDialog::onExportButtonClicked()
|
||||
QByteArray byteArray = toJson();
|
||||
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
|
||||
if (fileId > 0)
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << "Saved file with id = " << fileId;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << "Saved file with id = " << fileId;
|
||||
else
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << "Could not save file in library ";
|
||||
ERROR_LOG() << Q_FUNC_INFO << "Could not save file in library ";
|
||||
}
|
||||
|
||||
void TargetPartDialog::onImportButtonClicked()
|
||||
@@ -354,7 +353,7 @@ void TargetPartDialog::onImportButtonClicked()
|
||||
|
||||
void TargetPartDialog::onImport()
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "--- onImportButtonClicked() ";
|
||||
INFO_LOG() << Q_FUNC_INFO << "--- onImportButtonClicked() ";
|
||||
|
||||
QByteArray content;
|
||||
int fileId = m_flmGui->loadFileContent(this, content, {FileManagement::FileType::Xml},
|
||||
|
||||
+2
-3
@@ -49,7 +49,6 @@ TargetParticipantModel::TargetParticipantModel(QObject *parent)
|
||||
|
||||
},
|
||||
parent)
|
||||
, m_logger(getLogger("TargetParticipantModel"))
|
||||
{}
|
||||
|
||||
|
||||
@@ -74,7 +73,7 @@ bool TargetParticipantModel::initModel(const std::shared_ptr<TargetManagement::I
|
||||
|
||||
|
||||
const QMap<qint32, TargetManagement::ShootbackTarget> targetParticipants = m_tgt_dtc->shootbackTargets();
|
||||
INFO_LOG(m_logger) << "initModel - #TargetParticipantModel: " << targetParticipants.size();
|
||||
INFO_LOG() << "initModel - #TargetParticipantModel: " << targetParticipants.size();
|
||||
|
||||
connect(m_tgt_dtc.get(), &Interface::Dtc::shootbackTargetChanged,
|
||||
this, &TargetParticipantModel::onShootbackTargetChanged);
|
||||
@@ -151,7 +150,7 @@ QVariant TargetParticipantModel::headerData(int section, Qt::Orientation orienta
|
||||
|
||||
QVariant TargetParticipantModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " role=" << role
|
||||
INFO_LOG() << Q_FUNC_INFO << " role=" << role
|
||||
<< " index = " << index.column();
|
||||
|
||||
if (!indexIsValid(index))
|
||||
|
||||
Reference in new issue
Block a user