Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -15,8 +15,8 @@ namespace Evaluations
TopicEditorEvaluationModel::TopicEditorEvaluationModel(QObject *parent)
: NGLTreeModel(parent, new NGLTreeItem(QVariant()), { tr("Id"), tr("Name"), tr("Weight"), tr("Start Time"), tr("Situation"), tr("Video"), tr("Audio") })
TopicEditorEvaluationModel::TopicEditorEvaluationModel(QObject *parent) : NGLTreeModel(parent, new NGLTreeItem(QVariant()),,
m_logger(NGL::NGLLoggerBootstrap::getLogger()) { tr("Id"), tr("Name"), tr("Weight"), tr("Start Time"), tr("Situation"), tr("Video"), tr("Audio") })
{}
@@ -120,7 +120,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
{
if (!dtc)
return false;
DEBUG_LOG() << "initModel Folder";
DEBUG_LOG(m_logger) << "initModel Folder";
NGLTreeModel::resetModel();
@@ -144,7 +144,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
if (!parentItemIndexCache.contains(parentId))
{
ERROR_LOG() << "Invalid folder structure";
ERROR_LOG(m_logger) << "Invalid folder structure";
return false;
}
else
@@ -156,7 +156,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
data.setValue(crit);
onInsertRow(rowPos, pIndex, data);
parentItemIndexCache.insert(criteriumId+10000, index(rowPos, 0, pIndex));
DEBUG_LOG() << "Added to tree (criterium id, parent id) : (" << criteriumId << ", " << parentId << ")";
DEBUG_LOG(m_logger) << "Added to tree (criterium id, parent id) : (" << criteriumId << ", " << parentId << ")";
}
for (QMap<qint32, Evaluations::EvaluationElement>::const_iterator iter2 = elemMap.constBegin();
@@ -170,7 +170,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
if (!parentItemIndexCache.contains(parentId))
{
ERROR_LOG() << "Invalid folder structure";
ERROR_LOG(m_logger) << "Invalid folder structure";
return false;
}
else
@@ -183,7 +183,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
onInsertRow(rowPos, pIndex, data);
int elementId = elem.id();
parentItemIndexCache.insert(elementId,index(rowPos, 0, pIndex));
DEBUG_LOG() << "Added to tree (element id, parent id) : (" << elementId << ", " << parentId << ")";
DEBUG_LOG(m_logger) << "Added to tree (element id, parent id) : (" << elementId << ", " << parentId << ")";
}
}
}
@@ -194,7 +194,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
bool TopicEditorEvaluationModel::onInsertRow(int &row, const QModelIndex &parent, const QVariant &data)
{
DEBUG_LOG() << "onInsertRow";
DEBUG_LOG(m_logger) << "onInsertRow";
row = rowCount(parent);
NGLTreeItem *item = new NGLTreeItem(data, QIcon());
@@ -47,6 +47,8 @@ public slots:
bool onInsertRow(int &row, const QModelIndex &parent, const QVariant &data);
private:
NGL::INGLLogger &m_logger;
};
}
@@ -59,13 +59,13 @@ bool EvaluationTopicEditor::fetchInterfaces()
{
if (!m_session->getDtc<Evaluations::DataInterface>(m_evlDtc))
{
ERROR_LOG() << "Failed to retrieve Evl Dtc";
ERROR_LOG(m_logger) << "Failed to retrieve Evl Dtc";
return false;
}
if (!m_session->getForeignGuiInterface<OperatorManagement::ForeignGuiComboboxInterface>(m_opmCbxIfc))
{
ERROR_LOG() << "Failed to retrieve Evl ForeignGuiInterface";
ERROR_LOG(m_logger) << "Failed to retrieve Evl ForeignGuiInterface";
return false;
}
@@ -74,7 +74,7 @@ bool EvaluationTopicEditor::fetchInterfaces()
initOperatorComboBox();
DEBUG_LOG() << "fillOperatorComboBox m_operatorId = " << m_operatorId;
DEBUG_LOG(m_logger) << "fillOperatorComboBox m_operatorId = " << m_operatorId;
return true;
}
@@ -83,19 +83,19 @@ bool EvaluationTopicEditor::fetchInterfaces()
void EvaluationTopicEditor::updateInternalData()
{
DEBUG_LOG() << Q_FUNC_INFO;
DEBUG_LOG(m_logger) << Q_FUNC_INFO;
if (!hasTopicDataProperties())
return;
m_operatorId = getTopicDataValue(QStringLiteral("operatorId")).toInt();
DEBUG_LOG() << "operator id = " << m_operatorId;
DEBUG_LOG(m_logger) << "operator id = " << m_operatorId;
m_ui->cbxOperator->setCurrentIndex(m_ui->cbxOperator->findData(m_operatorId));
m_model->initModel(m_evlDtc, m_operatorId);
m_evlElement.id(getTopicDataValue(QStringLiteral("elementId")).toDouble());
DEBUG_LOG() << "element id = " << m_evlElement.id();
DEBUG_LOG(m_logger) << "element id = " << m_evlElement.id();
m_evlElement.timestamp(getTopicDataValue(QStringLiteral("start")).toDouble());
m_evlElement.situation(getTopicDataValue(QStringLiteral("situation")).toBool());
m_evlElement.audio(getTopicDataValue(QStringLiteral("audio")).toBool());
@@ -156,8 +156,8 @@ bool EvaluationTopicEditor::apply2()
setTopicDataProperty(QStringLiteral("audio"), m_evlElement.audio());
setTopicDataProperty(QStringLiteral("video"), m_evlElement.video());
DEBUG_LOG() << "operator id = " << m_operatorId << ", element id = " << m_evlElement.id();
DEBUG_LOG() << "timestamp: " << m_evlElement.timestamp();
DEBUG_LOG(m_logger) << "operator id = " << m_operatorId << ", element id = " << m_evlElement.id();
DEBUG_LOG(m_logger) << "timestamp: " << m_evlElement.timestamp();
if (m_evlElement.situation())
{
@@ -184,7 +184,7 @@ bool EvaluationTopicEditor::apply2()
data.duration = m_evlElement.duration();
data.properties = m_topicData.properties;
DEBUG_LOG() << "topicData - properties: " << QJsonDocument(m_topicData.properties).toJson(QJsonDocument::Compact);
DEBUG_LOG(m_logger) << "topicData - properties: " << QJsonDocument(m_topicData.properties).toJson(QJsonDocument::Compact);
emit topicEditorRequested(data);
}
@@ -221,7 +221,7 @@ bool EvaluationTopicEditor::apply2()
void EvaluationTopicEditor::onOperatorChanged()
{
m_operatorId = m_ui->cbxOperator->currentData().toInt();
DEBUG_LOG() << "operator id = " << m_operatorId;
DEBUG_LOG(m_logger) << "operator id = " << m_operatorId;
m_model->initModel(m_evlDtc, m_operatorId);
m_ui->trvEvaluations->expandAll();
@@ -232,11 +232,11 @@ void EvaluationTopicEditor::onSelectionChanged(const QItemSelection &selected, c
Q_UNUSED(selected);
Q_UNUSED(deselected);
DEBUG_LOG() << Q_FUNC_INFO;
DEBUG_LOG(m_logger) << Q_FUNC_INFO;
QModelIndex index = m_ui->trvEvaluations->currentIndex();
m_evlElement = m_model->getEvaluationElement(index);
DEBUG_LOG() << "element id = " << m_evlElement.id();
DEBUG_LOG(m_logger) << "element id = " << m_evlElement.id();
m_topicData.description = QString::number(m_evlElement.id());
slotChangesMade();
@@ -32,6 +32,8 @@ public:
bool fetchInterfaces();
private:
NGL::INGLLogger &m_logger;
void updateInternalData() override final;
void retranslate() override final;
@@ -25,7 +25,7 @@ CriteriumDialog::CriteriumDialog(const QString &menuGroup, LtsSession::LtsSessio
, m_ownEvaluationElements(ownEvlElements)
, m_requestHelper(new LtsUtils::RequestHelper(this))
{
DEBUG_LOG() << "CriteriumDialog ctor";
DEBUG_LOG(m_logger) << "CriteriumDialog ctor";
m_ui->setupUi(this);
m_buttonBox->connectButton(LtsWidgets::DialogButton::Print, this, &CriteriumDialog::onPrint);
@@ -89,13 +89,13 @@ void CriteriumDialog::tableColumnOrganiserSetting()
void CriteriumDialog::slotAdd()
{
DEBUG_LOG() << "CriteriumDialog::slotAdd";
DEBUG_LOG(m_logger) << "CriteriumDialog::slotAdd";
editCriterium(0 );
}
void CriteriumDialog::slotEdit()
{
DEBUG_LOG() << "CriteriumDialog::slotEdit";
DEBUG_LOG(m_logger) << "CriteriumDialog::slotEdit";
const QModelIndex srcIdx = m_ui->widget->currentIndex();
editCriterium(m_model->getRowData(srcIdx.row()).id() );
@@ -103,20 +103,20 @@ void CriteriumDialog::slotEdit()
void CriteriumDialog::slotRemove()
{
DEBUG_LOG() << "CriteriumDialog::slotRemove";
DEBUG_LOG(m_logger) << "CriteriumDialog::slotRemove";
const QModelIndex selIndex = m_ui->widget->currentIndex();
if (!selIndex.isValid())
return;
Core::RemoveElementRequest req(m_model->getRowData(selIndex.row()).id());
DEBUG_LOG() << "Removing criterium id = " << req.id();
DEBUG_LOG(m_logger) << "Removing criterium id = " << req.id();
m_requestHelper->startSingleRequest([req, this]()
{
return m_ftc->evlCriteriumRemoveRequest(req, this);
});
if (m_requestHelper->failed())
ERROR_LOG() << "Failed to remove criterium";
ERROR_LOG(m_logger) << "Failed to remove criterium";
}
@@ -145,7 +145,7 @@ bool CriteriumDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
int exerciseId,
int currentOperatorId)
{
DEBUG_LOG() << "CriteriumDialog::init";
DEBUG_LOG(m_logger) << "CriteriumDialog::init";
m_dtc = dtc;
m_ftc = ftc;
m_opmCbxDtc = opmCbxDtc;
@@ -175,7 +175,7 @@ bool CriteriumDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
for (auto i = criteria.constBegin(); i != criteria.constEnd(); ++i)
{
const EvaluationCriterium &p = (*i);
DEBUG_LOG() << "Criterium: id = " << p.id() << ", name = " << p.name().c_str() << ", desc = " << p.description().c_str();
DEBUG_LOG(m_logger) << "Criterium: id = " << p.id() << ", name = " << p.name().c_str() << ", desc = " << p.description().c_str();
}
connect(m_ui->widget, &LtsDataView::LtsDataView::signalSelectionChanged, this, &CriteriumDialog::enaDisa, Qt::UniqueConnection);
@@ -56,6 +56,8 @@ public:
int currentOperatorId);
protected:
NGL::INGLLogger &m_logger;
void onEvlCriteriumModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
void onEvlCriteriumRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
void onPrint();
@@ -20,7 +20,7 @@ CriteriumEditDialog::CriteriumEditDialog(QWidget *parent)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_ui(new Ui::CriteriumEditDialog)
{
DEBUG_LOG() << "CriteriumEditDialog ctor";
DEBUG_LOG(m_logger) << "CriteriumEditDialog ctor";
m_ui->setupUi(this);
@@ -43,7 +43,7 @@ bool CriteriumEditDialog::init(int criteriumId,
const std::shared_ptr<Interface::Ftc> &ftc,
const std::shared_ptr<OperatorManagement::ForeignGuiComboboxInterface> &opmCbxDtc)
{
DEBUG_LOG() << "CriteriumEditDialog::init";
DEBUG_LOG(m_logger) << "CriteriumEditDialog::init";
m_criteriumId = criteriumId;
m_dtc = dtc;
m_ftc = ftc;
@@ -123,9 +123,9 @@ void CriteriumEditDialog::onExportButtonClicked()
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
if (fileId > 0)
DEBUG_LOG() << "Saved file with id = " << fileId;
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
else
ERROR_LOG() << "Could not save file in library ";
ERROR_LOG(m_logger) << "Could not save file in library ";
}
void CriteriumEditDialog::onImportButtonClicked()
@@ -44,6 +44,8 @@ public:
const std::shared_ptr<OperatorManagement::ForeignGuiComboboxInterface> &opmCbxDtc);
protected:
NGL::INGLLogger &m_logger;
void onEvlCriteriumModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
void onEvlCriteriumRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
@@ -31,7 +31,7 @@ ElementEditDialog::ElementEditDialog(QWidget *)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_ui(new Ui::ElementEditDialog)
{
DEBUG_LOG() << "ElementEditDialog ctor";
DEBUG_LOG(m_logger) << "ElementEditDialog ctor";
m_ui->setupUi(this);
@@ -73,7 +73,7 @@ bool ElementEditDialog::init(int elementId,
const std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> &fltBuildingComponentIfc,
LtsSession::LtsSession *session)
{
DEBUG_LOG() << "ElementEditDialog::init";
DEBUG_LOG(m_logger) << "ElementEditDialog::init";
m_elementId = elementId;
m_criteriumId = criteriumId;
m_exerciseId = exerciseId;
@@ -97,7 +97,7 @@ bool ElementEditDialog::init(int elementId,
m_ui->cbxRating->setCurrentIndex(m_ui->cbxRating->findData(eval.rating()));
m_ui->teDesc->setText(QString::fromStdString(eval.note()));
m_ui->lblStartTime->setText(DTG::toStringMSec(eval.timestamp()));
ERROR_LOG() << "set start time label to " << m_ui->lblStartTime->text();
ERROR_LOG(m_logger) << "set start time label to " << m_ui->lblStartTime->text();
m_startTime = eval.timestamp();
m_ui->cbSituation->setChecked(eval.situation());
@@ -169,7 +169,7 @@ bool ElementEditDialog::apply()
if (m_session->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(sitMapIfc))
root[QStringLiteral("settings")] = sitMapIfc->operatorMapSettings();
else
ERROR_LOG() << "sit map ifc not available, can't save map settings :(";
ERROR_LOG(m_logger) << "sit map ifc not available, can't save map settings :(";
root[QStringLiteral("filters")] = getFilterSettings();
@@ -199,7 +199,7 @@ bool ElementEditDialog::apply()
void ElementEditDialog::fillPhasesComboBox()
{
DEBUG_LOG() << "fillPhasesComboBox";
DEBUG_LOG(m_logger) << "fillPhasesComboBox";
QSignalBlocker blocker(m_ui->cbxPhase);
m_ui->cbxPhase->clear();
m_ui->cbxPhase->addItem(tr("<not set>"), 0);
@@ -218,7 +218,7 @@ void ElementEditDialog::fillPhasesComboBox()
void ElementEditDialog::onCheckBoxClicked()
{
INFO_LOG() << "onCheckBoxClicked";
INFO_LOG(m_logger) << "onCheckBoxClicked";
if (m_startTime > 0)
return;
@@ -57,6 +57,8 @@ public:
LtsSession::LtsSession *session);
protected:
NGL::INGLLogger &m_logger;
void onEvlElementModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
void onEvlElementRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
@@ -18,7 +18,7 @@ ElementDialog::ElementDialog(QWidget *parent)
, m_ui(new Ui::ElementDialog)
, m_requestHelper(new LtsUtils::RequestHelper(this))
{
DEBUG_LOG() << "ElementDialog ctor";
DEBUG_LOG(m_logger) << "ElementDialog ctor";
m_ui->setupUi(this);
setOnlineHelpFilename(QStringLiteral("Situation-Own_Evaluation_Criteria"));
@@ -46,14 +46,14 @@ void ElementDialog::enaDisa()
void ElementDialog::slotAdd()
{
DEBUG_LOG() << "ElementDialog::slotAdd";
DEBUG_LOG(m_logger) << "ElementDialog::slotAdd";
addElementEditDialog();
}
void ElementDialog::slotEdit()
{
DEBUG_LOG() << "ElementDialog::slotEdit";
DEBUG_LOG(m_logger) << "ElementDialog::slotEdit";
addElementEditDialog(m_model->getRowData(m_ui->widget->currentIndex().row()).id() );
}
@@ -75,19 +75,19 @@ void ElementDialog::tableColumnOrganiserSetting()
void ElementDialog::slotRemove()
{
DEBUG_LOG() << "ElementDialog::slotRemove";
DEBUG_LOG(m_logger) << "ElementDialog::slotRemove";
QModelIndex selIndex = m_ui->widget->currentIndex();
if (!selIndex.isValid())
return;
m_requestHelper->startSingleRequest([this]()
{
DEBUG_LOG() << "Removing element id = " << m_model->getRowData(m_ui->widget->currentIndex().row()).id();
DEBUG_LOG(m_logger) << "Removing element id = " << m_model->getRowData(m_ui->widget->currentIndex().row()).id();
return m_ftc->evlElementRemoveRequest(EvlElementRemoveRequest(m_model->getRowData(m_ui->widget->currentIndex().row()).id(), m_criteriumId), this);
});
if (m_requestHelper->failed())
ERROR_LOG() << "Failed to remove criterium";
ERROR_LOG(m_logger) << "Failed to remove criterium";
}
QString ElementDialog::dialogIdentifier()
@@ -107,7 +107,7 @@ bool ElementDialog::init(int criteriumId,
const std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> &fltBuildingComponentIfc,
LtsSession::LtsSession *session)
{
DEBUG_LOG() << "ElementDialog::init";
DEBUG_LOG(m_logger) << "ElementDialog::init";
m_criteriumId = criteriumId;
m_exerciseId = exerciseId;
m_dtc = dtc;
@@ -135,7 +135,7 @@ bool ElementDialog::init(int criteriumId,
auto cb = [this](const Evaluations::EvaluationElement &e)
{
DEBUG_LOG() << "Element: id = " << e.id() << ", medium = " << e.rating();
DEBUG_LOG(m_logger) << "Element: id = " << e.id() << ", medium = " << e.rating();
};
m_dtc->evaluationElements(cb);
@@ -54,6 +54,8 @@ public:
static QString dialogIdentifier();
protected:
NGL::INGLLogger &m_logger;
void onEvlElementModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
void onEvlElementRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
@@ -47,7 +47,7 @@ bool ElementDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc,
};
dtc->evaluationElements(cb);
INFO_LOG() << "initModel - #EvalElements: " << m_vecData.size();
INFO_LOG(m_logger) << "initModel - #EvalElements: " << m_vecData.size();
return true;
}
@@ -45,6 +45,8 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<AudioVideoManagement::ForeignDataInterface> m_avmDataIfc;
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
friend class ElementDialogProxyModel;
@@ -29,7 +29,7 @@ bool CriteriumDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc,
this, &CriteriumDialogModel::onDataChanged);
dtc->evaluationCriteriums([this](const EvaluationCriterium & e) { insertRow(e); });
INFO_LOG() << "initModel - #EvalCriteria: " << m_vecData.size();
INFO_LOG(m_logger) << "initModel - #EvalCriteria: " << m_vecData.size();
return true;
}
@@ -36,6 +36,8 @@ public:
protected:
NGL::INGLLogger &m_logger;
private:
std::shared_ptr<OperatorManagement::Interface::Dtc> m_opmDtc;
friend class CriteriumFilterModel;
@@ -116,7 +116,7 @@ void SanNineLinerDialog::onEditSanNineLiner()
if (san.id() <= 0)
return;
DEBUG_LOG() << "current SanNineLinerId: " << san.id();
DEBUG_LOG(m_logger) << "current SanNineLinerId: " << san.id();
SanNineLinerEditDialog *dialog = new SanNineLinerEditDialog(this);
@@ -38,6 +38,7 @@ private slots:
void onRemoveSanNineLiner();
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
void onSanNineLinerRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
void tableColumnOrganiserSetting() override;
@@ -37,7 +37,7 @@ bool SanNineLinerDialogModel::initModel(const std::shared_ptr<Evaluations::Inter
insertRow(san);
});
INFO_LOG() << "initModel - #sanNineLiner: " << m_vecData.size();
INFO_LOG(m_logger) << "initModel - #sanNineLiner: " << m_vecData.size();
return true;
}
@@ -33,6 +33,7 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override final;
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<Evaluations::Interface::Dtc> m_evlDtc;
friend class SanNineLinerProxyModel;
};
@@ -45,6 +46,7 @@ public:
void setSourceModel(QAbstractItemModel *sourceModel) override;
private:
NGL::INGLLogger &m_logger;
SanNineLinerDialogModel *m_sourceModel{nullptr};
};
}
@@ -108,7 +108,7 @@ bool SanNineLinerEditDialog::init(LtsSession::LtsSessionDataDds *session,
QVector<Database::SanCategoryLine> linesCategory = SanCategoryLine::fromJson(data.lines(), data.id());
INFO_LOG() << "linesCategory size: " << linesCategory.size();
INFO_LOG(m_logger) << "linesCategory size: " << linesCategory.size();
for (const Database::SanCategoryLine &cl : std::as_const(linesCategory))
{
@@ -117,7 +117,7 @@ bool SanNineLinerEditDialog::init(LtsSession::LtsSessionDataDds *session,
QLineEdit *leLineAmount = findChild<QLineEdit*>(leName);
if (leLineAmount)
{
INFO_LOG() << "leName: " << leName << ", amount: " << cl.amount;
INFO_LOG(m_logger) << "leName: " << leName << ", amount: " << cl.amount;
leLineAmount->setText(QString::number(cl.amount));
continue;
@@ -128,7 +128,7 @@ bool SanNineLinerEditDialog::init(LtsSession::LtsSessionDataDds *session,
QRadioButton *rbCategory = findChild<QRadioButton*>(rbName);
if (rbCategory)
{
INFO_LOG() << "rbName: " << rbName;
INFO_LOG(m_logger) << "rbName: " << rbName;
rbCategory->setChecked(true);
continue;
}
@@ -139,7 +139,7 @@ bool SanNineLinerEditDialog::init(LtsSession::LtsSessionDataDds *session,
QCheckBox *cbxCategory = findChild<QCheckBox*>(cbxName);
if (cbxCategory)
{
INFO_LOG() << "cbxName: " << cbxName;
INFO_LOG(m_logger) << "cbxName: " << cbxName;
cbxCategory->setChecked(true);
}
}
@@ -250,7 +250,7 @@ bool SanNineLinerEditDialog::apply()
if (request.id() <= 0)
{
m_sanNineLinerId = m_requestHelper->getRepliedId();
ERROR_LOG() << "Created new san nine liner with id " << m_sanNineLinerId;
ERROR_LOG(m_logger) << "Created new san nine liner with id " << m_sanNineLinerId;
}
@@ -46,6 +46,7 @@ public:
protected:
NGL::INGLLogger &m_logger;
void onSanNineLinerModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
private slots:
@@ -34,6 +34,8 @@ private slots:
void onCommentChanged(const Evaluations::EvaluationComment &data, DataModification modType);
private:
NGL::INGLLogger &m_logger;
bool insertComment(const Evaluations::EvaluationComment &c);
void retranslate() override;
bool eventFilter(QObject *object, QEvent *event) override;
@@ -301,7 +301,7 @@ void EditSchemaDialog::onNotifyAboutSchema(const Evaluations::EvaluationSchema &
if (jError.error != QJsonParseError::NoError)
{
WARNING_LOG() << "Could not parse schema with database id " << data.id();
WARNING_LOG(m_logger) << "Could not parse schema with database id " << data.id();
return;
}
@@ -348,7 +348,7 @@ void EditSchemaDialog::loadSchema(qint32 schemaId)
if (jError.error != QJsonParseError::NoError)
{
WARNING_LOG() << "Could not load schema with database id " << m_mapSchemata.last().id();
WARNING_LOG(m_logger) << "Could not load schema with database id " << m_mapSchemata.last().id();
return;
}
@@ -903,12 +903,12 @@ void EditSchemaDialog::onLoadFromLibrary()
const QJsonDocument doc(QJsonDocument::fromJson(content, &jError));
if (jError.error != QJsonParseError::NoError)
{
WARNING_LOG() << "Could not parse schema !";
WARNING_LOG(m_logger) << "Could not parse schema !";
return;
}
if (!m_pModel->fromQJsonDocument(doc))
{
WARNING_LOG() << "Could not load schema !";
WARNING_LOG(m_logger) << "Could not load schema !";
return;
}
@@ -929,11 +929,11 @@ bool EditSchemaDialog::onSaveToLibrary()
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::EvaluationSchema, m_session->exerciseId(), byteArray);
if (fileId > 0)
{
DEBUG_LOG() << "Saved file with id = " << fileId;
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
return true;
}
else
ERROR_LOG() << "Could not save file in library ";
ERROR_LOG(m_logger) << "Could not save file in library ";
return false;
}
@@ -49,6 +49,8 @@ public:
void retranslate() override;
private:
NGL::INGLLogger &m_logger;
void onSendEvaluationReply(const Core::FunctionReplyObject &replyObject) override final;
void onEvlCommentModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
@@ -27,5 +27,7 @@ public:
void removeRow(const QModelIndex &idx, bool deleteRootAllowed = false);
protected:
NGL::INGLLogger &m_logger;
};
}
@@ -128,7 +128,7 @@ QJsonDocument TreeModelSchema::toJsonDocument() const
{
Q_UNUSED(idx);
Evaluations::ElementData e = v.value<Evaluations::ElementData>();
INFO_LOG() << "toJsonDocument: Name: " << e.getText() << ", elementId: " << e.m_id << ", parent id: " << e.m_parentId;
INFO_LOG(m_logger) << "toJsonDocument: Name: " << e.getText() << ", elementId: " << e.m_id << ", parent id: " << e.m_parentId;
QJsonObject obj;
obj[QStringLiteral("id")] = e.m_id;
@@ -172,7 +172,7 @@ bool TreeModelSchema::fromQJsonDocument(const QJsonDocument &doc)
m_elementId = std::max(m_elementId, d.m_id);
INFO_LOG() << "fromQJsonDocument: " << d.getText() << ", own id = " << d.m_id << ", parent id = " << d.m_parentId;
INFO_LOG(m_logger) << "fromQJsonDocument: " << d.getText() << ", own id = " << d.m_id << ", parent id = " << d.m_parentId;
}
++m_elementId;
@@ -9,10 +9,9 @@
namespace Evaluations
{
EvlNewCommentDialog::EvlNewCommentDialog(const std::shared_ptr<OperatorManagement::Interface::Dtc> &opmDtc,
QWidget *parent)
: QDialog(parent),
m_ui(new Ui::EvlNewCommentDialog)
{
QWidget *parent) : QDialog(parent),
m_ui(new Ui::EvlNewCommentDialog),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
m_ui->setupUi(this);
setWindowFlags(Qt::Tool);
m_ui->m_ltsComboBox_ReceiverOperator->addItem(tr("All (Default)"), 0);
@@ -32,6 +32,8 @@ private slots:
void onTextChanged();
private:
NGL::INGLLogger &m_logger;
Ui::EvlNewCommentDialog *m_ui{nullptr};
const int m_maxChars{255};
};