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

@@ -25,7 +25,7 @@ MarkerManagementApplyFilter::MarkerManagementApplyFilter(LtsSession::LtsSession
m_session->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(spSitMapGuiIfc);
if (!spSitMapGuiIfc)
{
ERROR_LOG() << "No spSitMapGuiIfc";
ERROR_LOG(m_logger) << "No spSitMapGuiIfc";
return;
}
m_sitMapGuiIfc = spSitMapGuiIfc;
@@ -46,7 +46,7 @@ const QJsonObject MarkerManagementApplyFilter::getFilterParamsJson() const
obj[QStringLiteral("SymbolAppearanceJson")] = symbolAppearanceSettings->settingsToJson();
}
else
WARNING_LOG() << "cannot get filter as SymApp filter ifc is missing";
WARNING_LOG(m_logger) << "cannot get filter as SymApp filter ifc is missing";
}
@@ -59,7 +59,7 @@ const QJsonObject MarkerManagementApplyFilter::getFilterParamsJson() const
obj[QStringLiteral("AesFilterJson")] = aesDisplayFilter->filterToJson();
}
else
WARNING_LOG() << "cannot get filter as aes filter ifc is missing";
WARNING_LOG(m_logger) << "cannot get filter as aes filter ifc is missing";
}
@@ -72,7 +72,7 @@ const QJsonObject MarkerManagementApplyFilter::getFilterParamsJson() const
obj[QStringLiteral("BuildingComponentSettingsJson")] = buildingComponentSettings->bldCmpSettingsToJson();
}
else
WARNING_LOG() << "cannot get filter as BldgCmpnt filter ifc is missing";
WARNING_LOG(m_logger) << "cannot get filter as BldgCmpnt filter ifc is missing";
}
return obj;
@@ -88,14 +88,14 @@ bool MarkerManagementApplyFilter::applyFilter(const QByteArray &filterContent)
{
if (filterContent.isEmpty())
{
ERROR_LOG() << "filterContent is empty";
ERROR_LOG(m_logger) << "filterContent is empty";
return false;
}
QJsonParseError parserError;
const QJsonDocument jDoc(QJsonDocument::fromJson(filterContent, &parserError));
if (parserError.error != QJsonParseError::NoError)
{
ERROR_LOG() << "Error parsing json document: " << parserError.errorString();
ERROR_LOG(m_logger) << "Error parsing json document: " << parserError.errorString();
return false;
}
return applyFilter(jDoc.object());
@@ -110,7 +110,7 @@ bool MarkerManagementApplyFilter::applyFilter(const QJsonObject &filterContent)
{
const QJsonObject innerObj = filterContent[QStringLiteral("AesFilterJson")].toObject();
if (innerObj.isEmpty())
ERROR_LOG() << "inner content AesFilterJson is empty";
ERROR_LOG(m_logger) << "inner content AesFilterJson is empty";
else
aesFilter.content(QJsonDocument(innerObj).toJson().constData());
}
@@ -123,7 +123,7 @@ bool MarkerManagementApplyFilter::applyFilter(const QJsonObject &filterContent)
{
QJsonObject innerObj = filterContent[QStringLiteral("SymbolAppearanceJson")].toObject();
if (innerObj.isEmpty())
ERROR_LOG() << "inner content SymbolAppearanceJson is empty";
ERROR_LOG(m_logger) << "inner content SymbolAppearanceJson is empty";
else
symbolAppearance.content(QJsonDocument(innerObj).toJson().constData());
}
@@ -136,7 +136,7 @@ bool MarkerManagementApplyFilter::applyFilter(const QJsonObject &filterContent)
{
QJsonObject innerObj = filterContent[QStringLiteral("BuildingComponentSettingsJson")].toObject();
if (innerObj.isEmpty())
ERROR_LOG() << "inner content BuildingComponentSettingsJson is empty";
ERROR_LOG(m_logger) << "inner content BuildingComponentSettingsJson is empty";
else
buildingComponentFilter.content(QJsonDocument(innerObj).toJson().constData());
}
@@ -187,7 +187,7 @@ bool MarkerManagementApplyFilter::applyFilter(const QJsonObject &filterContent)
appearanceSettings->setSettingsFromData(symbolAppearance);
} else
WARNING_LOG() << "cannot set filter as at least one filter ifc is missing (fltParticipantIfc|fltIfcPtr)";
WARNING_LOG(m_logger) << "cannot set filter as at least one filter ifc is missing (fltParticipantIfc|fltIfcPtr)";
@@ -206,7 +206,7 @@ bool MarkerManagementApplyFilter::applyFilter(const QJsonObject &filterContent)
buildingComponentSettings->setBldCmpSettingsFromData(buildingComponentFilter);
}
else
WARNING_LOG() << "cannot set filter as at least one filter ifc is missing (fltBldgCmpntIfc)";
WARNING_LOG(m_logger) << "cannot set filter as at least one filter ifc is missing (fltBldgCmpntIfc)";
return true;
}
@@ -31,6 +31,8 @@ public:
const QJsonObject getFilterParamsJson() const;
private:
NGL::INGLLogger &m_logger;
LtsSession::LtsSession *m_session;
std::weak_ptr<FilterManagement::ForeignFltParticipantGuiInterface> m_fltParticipantIfc;
@@ -92,7 +92,7 @@ void MarkerManagementDialogModel::loadPreview(int fileContentId, int rowId)
QByteArray byteArray;
if (m_flmGui->loadContent(fileContentId, byteArray, true) && byteArray.size() > 0)
{
DEBUG_LOG() << "m_previews.insert fileContentId=" << fileContentId
DEBUG_LOG(m_logger) << "m_previews.insert fileContentId=" << fileContentId
<< " size Preview=" << byteArray.size();
QString str = QStringLiteral("<html><center><img src='data:image/png;base64,%1'></center></html>").arg(QString::fromLatin1(byteArray.toBase64()));
m_previews.insert(fileContentId, str);
@@ -56,6 +56,8 @@ private slots:
void loadPreview(int fileContentId, int rowId);
private:
NGL::INGLLogger &m_logger;
void requestNextFileContent();
private:
@@ -62,21 +62,21 @@ SnapshotTopicEditor::~SnapshotTopicEditor()
void SnapshotTopicEditor::updateInternalData()
{
DEBUG_LOG() << Q_FUNC_INFO;
DEBUG_LOG(m_logger) << Q_FUNC_INFO;
m_ui->snapshotsDataView->selectionModel()->clear();
m_snapshotId = m_topicData.properties.value(QStringLiteral("snapshotId")).toInt(0);
if (m_snapshotId > 0)
{
DEBUG_LOG() << "snapshotId = " << m_snapshotId;
DEBUG_LOG(m_logger) << "snapshotId = " << m_snapshotId;
QModelIndex idx = m_snapshotModel->findIndexForId(m_snapshotId);
if (idx.isValid())
{
m_ui->snapshotsDataView->selectRow(m_proxyModel->mapFromSource(idx));
const MarkerManagement::Snapshot snapshot = m_snapshotModel->getRowData(idx.row());
DEBUG_LOG() << "SnapShot Selected " << snapshot.id() ;
DEBUG_LOG(m_logger) << "SnapShot Selected " << snapshot.id() ;
m_snapshotId = snapshot.id();
m_ui->lblName->setText(QString::fromStdString(snapshot.name()));
}
@@ -114,7 +114,7 @@ void SnapshotTopicEditor::onSnapshotSelected()
return;
m_snapshotId = snapshot.id();
DEBUG_LOG() << "new snapshot id = " << m_snapshotId;
DEBUG_LOG(m_logger) << "new snapshot id = " << m_snapshotId;
m_ui->lblName->setText(QString::fromStdString(snapshot.name()));
slotChangesMade();
}
@@ -31,6 +31,8 @@ public:
~SnapshotTopicEditor();
private:
NGL::INGLLogger &m_logger;
void updateInternalData() override final;
void retranslate() override final;
@@ -76,7 +76,7 @@ bool SnapshotCreateDialog::init(const std::shared_ptr<MarkerManagement::Interfac
m_session = session;
if (!m_session->getForeignGuiInterface<FileManagement::ForeignGuiInterface>(m_flmGui))
ERROR_LOG() << "flm gui missing - cannot create screenshots for a snapshot";
ERROR_LOG(m_logger) << "flm gui missing - cannot create screenshots for a snapshot";
m_ui->cbSavePreview->setEnabled(false);
m_ui->cbSavePreview->setChecked(true);
@@ -126,8 +126,8 @@ void SnapshotCreateDialog::sendSnapshotRequest()
req.timeStamp(partitionTime);
req.fileContentId(m_fileId);
DEBUG_LOG() << "Edit/Create snapshot id = " << m_editData.id();
DEBUG_LOG() << "File id = " << m_fileId;
DEBUG_LOG(m_logger) << "Edit/Create snapshot id = " << m_editData.id();
DEBUG_LOG(m_logger) << "File id = " << m_fileId;
if (m_requestHelper->startSingleRequest([req, this]()
{
@@ -135,7 +135,7 @@ void SnapshotCreateDialog::sendSnapshotRequest()
}))
{
m_editData.id(m_requestHelper->getRepliedId());
DEBUG_LOG() << "Saved snapshot with id = " << m_requestHelper->getRepliedId();
DEBUG_LOG(m_logger) << "Saved snapshot with id = " << m_requestHelper->getRepliedId();
__unchange__();
closeRequest();
}
@@ -190,12 +190,12 @@ void SnapshotCreateDialog::saveSnapshotPreviewInLibrary()
const QString title = ( m_ui->leName->text() + QStringLiteral(" (")+ dtg + QStringLiteral(")"));
DEBUG_LOG() << "saveSnapshotPreviewInLibrary: " << title;
DEBUG_LOG(m_logger) << "saveSnapshotPreviewInLibrary: " << title;
auto spSitMapGuiIfc = m_sitMapGuiIfc.lock();
if (!spSitMapGuiIfc->isMapReady())
{
ERROR_LOG() << Q_FUNC_INFO << " sitMapGuiInterface not ready";
ERROR_LOG(m_logger) << Q_FUNC_INFO << " sitMapGuiInterface not ready";
return;
}
@@ -223,7 +223,7 @@ void SnapshotCreateDialog::saveSnapshotPreviewInLibrary()
initialFolderId = exeFolderId;
}
DEBUG_LOG() << "Initial folder Id = " << initialFolderId
DEBUG_LOG(m_logger) << "Initial folder Id = " << initialFolderId
<< " snapshotFolderId =" << snapshotFolderId;
const int folderId = snapshotFolderId > 0 ? snapshotFolderId : initialFolderId;
@@ -252,13 +252,13 @@ void SnapshotCreateDialog::saveSnapshotPreviewInLibrary()
}))
{
m_fileId = m_requestHelper->getRepliedId();
DEBUG_LOG() << "Saved file in library with id = " << m_fileId;
DEBUG_LOG(m_logger) << "Saved file in library with id = " << m_fileId;
sendSnapshotRequest();
if (m_editData.fileContentId() != m_fileId)
{
DEBUG_LOG() << "One more request needed!";
DEBUG_LOG(m_logger) << "One more request needed!";
m_editData.fileContentId(m_fileId);
}
}
@@ -52,6 +52,8 @@ public:
bool apply() override final;
protected:
NGL::INGLLogger &m_logger;
void retranslate() override;
QByteArray getFilterParams() const;
@@ -120,7 +120,7 @@ void MarkerManagementDialog::onEditMarker()
if (marker.id() <= 0)
return;
DEBUG_LOG() << "current MarkerId: " << marker.id();
DEBUG_LOG(m_logger) << "current MarkerId: " << marker.id();
AudioVideoManagement::StreamNameMapping *streamNameMapping = nullptr;
if (m_avmInterface)
@@ -60,6 +60,8 @@ private slots:
void onShowOtherUsersMarkers(bool isChecked);
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
void tableColumnOrganiserSetting() override;
@@ -41,6 +41,8 @@ public:
void onMarkerModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
void createDescriptions(const MarkerManagement::Marker &marker);
QString toDisplayNames(const QString &videoStreams);
@@ -55,27 +55,27 @@ bool InterfaceImpl::fetchInterfaces()
m_session->getForeignDataInterface_NEW<FileManagement::ForeignGuiInterface>(m_flmGui);
if (!m_session->getDtc<OperatorManagement::DataInterface>(m_opmDtc))
WARNING_LOG() << "No Opm Dtc, no Snapshots";
WARNING_LOG(m_logger) << "No Opm Dtc, no Snapshots";
if (!m_session->getDtc<FileManagement::DataInterface>(m_flmDtc))
WARNING_LOG() << "No Flm Dtc, no Snapshots";
WARNING_LOG(m_logger) << "No Flm Dtc, no Snapshots";
if (!m_session->getFtc<FileManagement::DataInterface>(m_flmFtc))
WARNING_LOG() << "No Flm Ftc, no Snapshots";
WARNING_LOG(m_logger) << "No Flm Ftc, no Snapshots";
if (!m_session->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(m_sitMapGuiIfc))
WARNING_LOG() << "No SitMap, no Snapshots";
WARNING_LOG(m_logger) << "No SitMap, no Snapshots";
if (!m_session->getDtc<SituationReplayManagement::DataInterface>(m_coreDtc))
{
WARNING_LOG() << "No ReplayManagement!!";
WARNING_LOG(m_logger) << "No ReplayManagement!!";
return false;
}
if (m_session->app() == LtsAppDescriptor::App::Scripts
&& !m_session->getForeignGuiInterface<SituationReplay::ForeignGuiInterface>(m_srpIfc))
{
WARNING_LOG() << "Scripts: MarkerManagement: no srp, no topic!";
WARNING_LOG(m_logger) << "Scripts: MarkerManagement: no srp, no topic!";
return false;
}
@@ -91,43 +91,43 @@ bool InterfaceImpl::fetchInterfacesReplay()
if (!m_session->getForeignDataInterface<SituationReplayManagement::DataInterface>(m_srmForeign))
{
WARNING_LOG() << "No Srm, no Snapshots";
WARNING_LOG(m_logger) << "No Srm, no Snapshots";
m_snapshotsAvailable = false;
}
if (!LtsAppManager::LtsAppManager::getInstance()->hasApp(LtsAppDescriptor::App::Snapshot))
{
DEBUG_LOG() << "No Snapshot App? no Snapshots!";
DEBUG_LOG(m_logger) << "No Snapshot App? no Snapshots!";
m_snapshotsAvailable = false;
}
if (!m_session->getDtc<OperatorManagement::DataInterface>(m_opmDtc))
{
WARNING_LOG() << "No Opm, no Snapshots";
WARNING_LOG(m_logger) << "No Opm, no Snapshots";
m_snapshotsAvailable = false;
}
if (!m_session->getForeignGuiInterface<FilterManagement::ForeignFltParticipantGuiInterface>(m_fltParticipantIfc))
{
WARNING_LOG() << "No Flt/Part, no Snapshots";
WARNING_LOG(m_logger) << "No Flt/Part, no Snapshots";
m_snapshotsAvailable = false;
}
if (!m_session->getForeignGuiInterface<FilterManagement::ForeignAesGuiInterface>(m_fltAesIfc))
{
WARNING_LOG() << "No Flt/Aes, no Snapshots";
WARNING_LOG(m_logger) << "No Flt/Aes, no Snapshots";
m_snapshotsAvailable = false;
}
if (!m_session->getForeignGuiInterface<FilterManagement::ForeignFltBuildingComponentGuiInterface>(m_fltBuildingComponentIfc))
{
DEBUG_LOG() << "No Flt/BuildingComponent";
DEBUG_LOG(m_logger) << "No Flt/BuildingComponent";
}
if (!m_session->getForeignGuiInterface<FileManagement::ForeignGuiInterface>(m_flmGui))
{
WARNING_LOG() << "No Flm, no Snapshots";
WARNING_LOG(m_logger) << "No Flm, no Snapshots";
m_snapshotsAvailable = false;
}
@@ -306,30 +306,30 @@ void InterfaceImpl::startSnapshot()
try
{
DEBUG_LOG() << "replayPartitionCreateRequest ...";
DEBUG_LOG(m_logger) << "replayPartitionCreateRequest ...";
m_replayPartitionId = m_srmForeign->replayPartitionCreateRequest(m_session->exerciseId(),
LtsSessionData::LtsSessionData::getInstance()->getWorkstationId(),
LtsSessionData::LtsSessionData::getInstance()->getOperatorId(),
Core::ReplayType_def::SnapshotData);
DEBUG_LOG() << "replayPartitionCreateRequest ...DONE";
DEBUG_LOG(m_logger) << "replayPartitionCreateRequest ...DONE";
}
catch(const std::runtime_error &rterr)
{
ERROR_LOG() << "Failed to start replay partition for snapshot. std::runtime_error";
ERROR_LOG() << "Failed to start replay partition for snapshot. std::runtime_error: " << rterr.what();
ERROR_LOG(m_logger) << "Failed to start replay partition for snapshot. std::runtime_error";
ERROR_LOG(m_logger) << "Failed to start replay partition for snapshot. std::runtime_error: " << rterr.what();
new LtsWidgets::LtsMessageDialogNew(m_session->baseLayout(), tr("Failed to start replay partition for snapshot!"));
return;
}
catch(const std::exception &exception)
{
ERROR_LOG() << "Failed to start replay partition for snapshot. Exception: " << exception.what();
ERROR_LOG(m_logger) << "Failed to start replay partition for snapshot. Exception: " << exception.what();
new LtsWidgets::LtsMessageDialogNew(m_session->baseLayout(), tr("Failed to start replay partition for snapshot!"));
return;
}
catch(...)
{
ERROR_LOG() << "Failed to start replay partition for snapshot. Exception: ... ";
ERROR_LOG(m_logger) << "Failed to start replay partition for snapshot. Exception: ... ";
new LtsWidgets::LtsMessageDialogNew(m_session->baseLayout(), tr("Failed to start replay partition for snapshot!"));
return;
}
@@ -337,7 +337,7 @@ void InterfaceImpl::startSnapshot()
if (m_replayPartitionId < 0)
{
ERROR_LOG() << "Failed to start replay partition for snapshot - invalid replay partition id!";
ERROR_LOG(m_logger) << "Failed to start replay partition for snapshot - invalid replay partition id!";
new LtsWidgets::LtsMessageDialogNew(m_session->baseLayout(), tr("Failed to start replay partition for snapshot - invalid replay partition id!"));
return;
}
@@ -458,12 +458,12 @@ bool InterfaceImpl::applyFilter(const Snapshot &snapshot, NGL::INGLLogger &logge
}
else
{
ERROR_LOG() << Q_FUNC_INFO << "Error while applying filters";
ERROR_LOG(m_logger) << Q_FUNC_INFO << "Error while applying filters";
}
}
else
{
ERROR_LOG() << Q_FUNC_INFO << "No Filter Ifc (Part or Aes) to apply filters";
ERROR_LOG(m_logger) << Q_FUNC_INFO << "No Filter Ifc (Part or Aes) to apply filters";
}
return false;
@@ -504,7 +504,7 @@ bool InterfaceImpl::snapshotAdjustSitMap(const Snapshot &snapshot, bool bApplyFi
if (!planOverlay.isEmpty())
{
const bool bIsMapReady = sitMapGuiIfc->isMapReady();
DEBUG_LOG() << Q_FUNC_INFO << " bIsMapReady = " << bIsMapReady;
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " bIsMapReady = " << bIsMapReady;
if (bIsMapReady)
{
@@ -540,7 +540,7 @@ bool InterfaceImpl::snapshotAdjustSitMap(const Snapshot &snapshot, bool bApplyFi
<< " planOverlay: " << planOverlay;
};
if (!sitMapGuiIfc->setMapReadyCallback(this, onMapIsReadyFn))
ERROR_LOG() << Q_FUNC_INFO << ", setMapReadyCallback failed, snapShotOverlayId: " << snapShotOverlayId;
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", setMapReadyCallback failed, snapShotOverlayId: " << snapShotOverlayId;
}
}
@@ -595,7 +595,7 @@ void InterfaceImpl::resetReplay()
}
else
{
WARNING_LOG() << "could not reset sit map original settings - leaving settings as is...";
WARNING_LOG(m_logger) << "could not reset sit map original settings - leaving settings as is...";
}
}
@@ -604,7 +604,7 @@ TopicReplay::Interface *InterfaceImpl::createInterface(TopicEditorBase::TopicTyp
{
std::shared_ptr<MarkerManagement::Interface::Dtc> mrkDtc;
if (!m_session->getDtc<MarkerManagement::DataInterface>(mrkDtc))
WARNING_LOG() << "mrk dtc missing - snapshot topics cannot live fetch data but instead uses data saved inside the topic";
WARNING_LOG(m_logger) << "mrk dtc missing - snapshot topics cannot live fetch data but instead uses data saved inside the topic";
return new TopicReplayInterface(m_srpIfc, mrkDtc, m_scriptsMrkIfc , m_logger);
}
@@ -636,7 +636,7 @@ bool TopicReplayInterface::playbackInit(const QJsonObject &attributes)
{
if (m_srpIfc == nullptr)
{
WARNING_LOG() << "MarkerManagement:TopicReplayInterface::playbackInit: no srp ifc, no playback";
WARNING_LOG(m_logger) << "MarkerManagement:TopicReplayInterface::playbackInit: no srp ifc, no playback";
return false;
}
@@ -648,7 +648,7 @@ bool TopicReplayInterface::playbackInit(const QJsonObject &attributes)
if (m_snapshot.id() <= 0 || m_snapshot.timeStamp() < 1)
{
WARNING_LOG() << "cannot fetch live snapshot data (maybe snapshot with id '"<<attributes[QStringLiteral("snapshotId")].toInt(0 )<<"' was deleted), using saved data - timestamp: " << m_snapshot.timeStamp();
WARNING_LOG(m_logger) << "cannot fetch live snapshot data (maybe snapshot with id '"<<attributes[QStringLiteral("snapshotId")].toInt(0 )<<"' was deleted), using saved data - timestamp: " << m_snapshot.timeStamp();
m_snapshot.planOverlay(attributes[QStringLiteral("planOverlay")].toString().toUtf8().data());
m_snapshot.filter(attributes[QStringLiteral("snapshotFilter")].toString().toUtf8().data());
@@ -658,7 +658,7 @@ bool TopicReplayInterface::playbackInit(const QJsonObject &attributes)
if (m_snapshot.timeStamp() < 1)
{
WARNING_LOG() << "invalid snapshot timestamp for playback: " << QString::fromUtf8(QJsonDocument(attributes).toJson());
WARNING_LOG(m_logger) << "invalid snapshot timestamp for playback: " << QString::fromUtf8(QJsonDocument(attributes).toJson());
return false;
}
@@ -666,14 +666,14 @@ bool TopicReplayInterface::playbackInit(const QJsonObject &attributes)
if (scriptsExerciseId == 0)
{
WARNING_LOG() << "invalid script's exercise id for playback: "
WARNING_LOG(m_logger) << "invalid script's exercise id for playback: "
<< attributes[QStringLiteral("scriptsExerciseId")].toVariant().toString();
return false;
}
if (m_parentIfc == nullptr || !m_parentIfc->snapshotAdjustSitMap(m_snapshot, true, m_originalMapSettings, nullptr, m_logger))
{
WARNING_LOG() << "Cannot adjust Situation Map Ifc from Snapshot app";
WARNING_LOG(m_logger) << "Cannot adjust Situation Map Ifc from Snapshot app";
return false;
}
@@ -720,15 +720,15 @@ bool InterfaceImpl::eventFilter(QObject *obj, QEvent *event)
event->type() == LtsWidgets::AddSnapshotEvent::addSnapshotEventId() ||
event->type() == LtsWidgets::SaveSnapshotEvent::saveSnapshotEventId()))
{
ERROR_LOG() << "Filtering voice commands (add/set marker, add/save snapshot)";
ERROR_LOG(m_logger) << "Filtering voice commands (add/set marker, add/save snapshot)";
if (event->type() == LtsWidgets::SetMarkerEvent::setMarkerEventId())
{
DEBUG_LOG() << "Set marker";
DEBUG_LOG(m_logger) << "Set marker";
auto ev = static_cast<LtsWidgets::SetMarkerEvent*>(event);
DEBUG_LOG() << "Event description = " << ev->getDescription();
DEBUG_LOG(m_logger) << "Event description = " << ev->getDescription();
MarkerManagement::Marker req;
@@ -763,13 +763,13 @@ bool InterfaceImpl::eventFilter(QObject *obj, QEvent *event)
}))
{
req.id(m_requestHelper->getRepliedId());
DEBUG_LOG() << "Saved Marker with id = " << m_requestHelper->getRepliedId();
DEBUG_LOG(m_logger) << "Saved Marker with id = " << m_requestHelper->getRepliedId();
}
}
if (event->type() == LtsWidgets::AddMarkerEvent::addMarkerEventId())
{
DEBUG_LOG() << "init dialog Add marker";
DEBUG_LOG(m_logger) << "init dialog Add marker";
LtsWidgets::LtsBaseLayoutWidget *baseLayout = m_session->baseLayout();
@@ -793,7 +793,7 @@ bool InterfaceImpl::eventFilter(QObject *obj, QEvent *event)
}
if (event->type() == LtsWidgets::AddSnapshotEvent::addSnapshotEventId() && m_snapshotsAvailable)
{
DEBUG_LOG() << "init dialog Add snapshot";
DEBUG_LOG(m_logger) << "init dialog Add snapshot";
LtsWidgets::LtsBaseLayoutWidget *baseLayout = m_session->baseLayout();
@@ -818,11 +818,11 @@ bool InterfaceImpl::eventFilter(QObject *obj, QEvent *event)
if (event->type() == LtsWidgets::SaveSnapshotEvent::saveSnapshotEventId() && m_snapshotsAvailable)
{
DEBUG_LOG() << "Save snapshot";
DEBUG_LOG(m_logger) << "Save snapshot";
auto ev = static_cast<LtsWidgets::SaveSnapshotEvent*>(event);
DEBUG_LOG() << "Event description = " << ev->getDescription();
DEBUG_LOG(m_logger) << "Event description = " << ev->getDescription();
qint64 partitionTime = m_session->partitionTime();
@@ -854,7 +854,7 @@ bool InterfaceImpl::eventFilter(QObject *obj, QEvent *event)
}))
{
req.id(m_requestHelper->getRepliedId());
DEBUG_LOG() << "Saved Snapshot with id = " << m_requestHelper->getRepliedId();
DEBUG_LOG(m_logger) << "Saved Snapshot with id = " << m_requestHelper->getRepliedId();
}
}
@@ -73,6 +73,8 @@ public:
QVector<TopicEditorBase::TopicData> additionalTrackEntries(const QJsonObject &attributes) const override;
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<SituationReplay::ForeignGuiInterface> m_srpIfc;
Snapshot m_snapshot;
QByteArray m_originalMapSettings;
@@ -61,7 +61,8 @@ bool containsStream(QComboBox *cb, const QString &internalStreamName)
namespace MarkerManagement
{
FinishedSignal::FinishedSignal():QObject(){}
FinishedSignal::FinishedSignal() : QObject(),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {}
SetMarkers::SetMarkers(LtsSession::LtsSession *session, QWidget *parent)
@@ -169,7 +170,7 @@ bool SetMarkers::apply()
}
catch(const std::exception &ex)
{
ERROR_LOG() << "saving marker failed: " << ex.what();
ERROR_LOG(m_logger) << "saving marker failed: " << ex.what();
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Failed to save marker. Please try again later."));
return false;
}
@@ -333,13 +334,13 @@ void SetMarkers::sendMarkerRequest() noexcept(false)
req.timeStampOffset(m_ui->cbxOffset->currentText().toInt() * 1000);
req.fileContentId(m_fileId);
DEBUG_LOG() << "Start Marker request with file content Id = " << m_fileId;
DEBUG_LOG(m_logger) << "Start Marker request with file content Id = " << m_fileId;
auto id = m_ftc->markerModifyRequest(req);
m_editData.id(id);
DEBUG_LOG() << "Saved marker with id = " << m_requestHelper->getRepliedId();
DEBUG_LOG(m_logger) << "Saved marker with id = " << m_requestHelper->getRepliedId();
}
void SetMarkers::saveMarkerInLibrary() noexcept(false)
@@ -351,13 +352,13 @@ void SetMarkers::saveMarkerInLibrary() noexcept(false)
.arg(LtsSessionData::LtsSessionData::getInstance()->getOperatorId())
.arg(m_ui->teNote->toPlainText().left(20));
DEBUG_LOG() << "saveMarkerInLibrary: " << title;
DEBUG_LOG(m_logger) << "saveMarkerInLibrary: " << title;
auto spSitMapGuiIfc = m_sitMapGuiIfc.lock();
if (!spSitMapGuiIfc->isMapReady())
{
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Cannot create a marker as the map is not ready yet."));
ERROR_LOG() << Q_FUNC_INFO << " sitMapGuiInterface not ready";
ERROR_LOG(m_logger) << Q_FUNC_INFO << " sitMapGuiInterface not ready";
return;
}
@@ -369,13 +370,13 @@ void SetMarkers::saveMarkerInLibrary() noexcept(false)
auto onImage = [this, &fig, &image](const QImage &_image)
{
image = _image;
DEBUG_LOG() << "onImage callback: image size (w, h) = (" << image.width() << ", " << image.height() << ")";
DEBUG_LOG(m_logger) << "onImage callback: image size (w, h) = (" << image.width() << ", " << image.height() << ")";
QMetaObject::invokeMethod(fig.get(), &FinishedSignal::finished, Qt::QueuedConnection);
};
if (!spSitMapGuiIfc->toImage(this, onImage))
{
ERROR_LOG() << "Failed to save marker image from map";
ERROR_LOG(m_logger) << "Failed to save marker image from map";
return;
}
@@ -418,17 +419,17 @@ void SetMarkers::saveMarkerInLibrary() noexcept(false)
}
catch(const std::exception &ex)
{
ERROR_LOG() << "failed to save image for marker: " << ex.what();
ERROR_LOG(m_logger) << "failed to save image for marker: " << ex.what();
return;
}
DEBUG_LOG() << "Saved file in library with id = " << m_fileId;
DEBUG_LOG(m_logger) << "Saved file in library with id = " << m_fileId;
sendMarkerRequest();
if (m_editData.fileContentId() != m_fileId)
{
DEBUG_LOG() << "One more request needed!";
DEBUG_LOG(m_logger) << "One more request needed!";
m_editData.fileContentId(m_fileId);
}
}
@@ -51,7 +51,7 @@ SnapshotDialog::SnapshotDialog(const QString &menuGroup, LtsSession::LtsSession
, m_planEditorApp(nullptr)
, m_fileId(-1)
{
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
m_ui->setupUi(this);
m_buttonBox->connectButton(LtsWidgets::DialogButton::Show,
@@ -82,16 +82,16 @@ SnapshotDialog::SnapshotDialog(const QString &menuGroup, LtsSession::LtsSession
setOnlineHelpFilename(QStringLiteral("Situation-Snapshots"));
m_ui->widget->setSelectionMode(QAbstractItemView::SelectionMode::ExtendedSelection);
session->getForeignGuiInterface<FileManagement::ForeignGuiInterface>(m_flmGui);
TRACE_LOG() << Q_FUNC_INFO << " END";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
}
SnapshotDialog::~SnapshotDialog()
{
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
delete m_ui;
TRACE_LOG() << Q_FUNC_INFO << " END";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
}
@@ -120,7 +120,7 @@ void SnapshotDialog::onShow()
void SnapshotDialog::onRefreshCurrent(const Snapshot &snapshot)
{
INFO_LOG() << Q_FUNC_INFO << " current SnapshotId: " << snapshot.id();
INFO_LOG(m_logger) << Q_FUNC_INFO << " current SnapshotId: " << snapshot.id();
if (snapshot.id() != m_currentSnapshot.id())
@@ -133,7 +133,7 @@ void SnapshotDialog::onRefreshCurrent(const Snapshot &snapshot)
void SnapshotDialog::showSnapshot()
{
INFO_LOG() << Q_FUNC_INFO << " current SnapshotId: " << m_currentSnapshot.id();
INFO_LOG(m_logger) << Q_FUNC_INFO << " current SnapshotId: " << m_currentSnapshot.id();
showSnapshotInternal(m_currentSnapshot, true);
enaDisa();
@@ -146,7 +146,7 @@ bool SnapshotDialog::applyFilter(const Snapshot &snapshot)
if (filterContent.isEmpty())
{
ERROR_LOG() << "filterContent is empty, snapshot.id()="<< snapshot.id();
ERROR_LOG(m_logger) << "filterContent is empty, snapshot.id()="<< snapshot.id();
return false;
}
@@ -155,7 +155,7 @@ bool SnapshotDialog::applyFilter(const Snapshot &snapshot)
if (!appFilter.applyFilter(filterContent))
{
ERROR_LOG() << Q_FUNC_INFO << " Error while applying filters";
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Error while applying filters";
return false;
}
@@ -178,13 +178,13 @@ bool SnapshotDialog::applyFilter(const Snapshot &snapshot)
MarkerManagementApplyFilter appFilter2(pe_session, pe_fltParticipantIfc, pe_fltAesIfc, pe_fltBuildingComponentIfc);
if (!appFilter2.applyFilter(filterContent))
{
ERROR_LOG() << Q_FUNC_INFO << "Error while applying filters";
ERROR_LOG(m_logger) << Q_FUNC_INFO << "Error while applying filters";
return false;
}
} else
ERROR_LOG() << Q_FUNC_INFO << "getForeignGuiInterface failed";
ERROR_LOG(m_logger) << Q_FUNC_INFO << "getForeignGuiInterface failed";
} else
ERROR_LOG() << Q_FUNC_INFO << "Internal error - can not get previously created session!";
ERROR_LOG(m_logger) << Q_FUNC_INFO << "Internal error - can not get previously created session!";
}
@@ -204,7 +204,7 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
SituationMap::SitMapUpdatesEnabledHelper sitMapHelper(spSitMapGuiIfc);
const int partitionId = m_session->partitionId();
INFO_LOG() << Q_FUNC_INFO << " current Snapshot: " << snapshot
INFO_LOG(m_logger) << Q_FUNC_INFO << " current Snapshot: " << snapshot
<< ", replayPartition: " << partitionId
<< ", applyFilter=" << bApplyFilter;
@@ -218,7 +218,7 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
if (!m_requestHelper->startSingleRequest([req, this]() { return m_srpFtc->changeReplayStateRequest(req, this); }))
{
ERROR_LOG() << "Replay could not be started for partition id = " << partitionId;
ERROR_LOG(m_logger) << "Replay could not be started for partition id = " << partitionId;
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Replay could not be started for partition with id %1").arg(partitionId));
return false;
}
@@ -229,7 +229,7 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
if (bApplyFilter)
if (!applyFilter(snapshot))
{
ERROR_LOG() << "applyFilter failed, partition id = " << partitionId;
ERROR_LOG(m_logger) << "applyFilter failed, partition id = " << partitionId;
success = false;
}
@@ -239,7 +239,7 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
std::shared_ptr<PlanOverlaysPlugin::ForeignGuiInterface> ovrDtc;
if (m_session->getForeignGuiInterface<PlanOverlaysPlugin::ForeignGuiInterface>(ovrDtc))
{
INFO_LOG() << Q_FUNC_INFO << " unloadAllPlans via PlanOverlaysPlugin to update dialog";
INFO_LOG(m_logger) << Q_FUNC_INFO << " unloadAllPlans via PlanOverlaysPlugin to update dialog";
ovrDtc->unloadAllPlans();
}
@@ -254,13 +254,13 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
{
const bool bIsMapReady = spSitMapGuiIfc->isMapReady();
INFO_LOG() << Q_FUNC_INFO << " bIsMapReady = " << bIsMapReady;
INFO_LOG(m_logger) << Q_FUNC_INFO << " bIsMapReady = " << bIsMapReady;
if (bIsMapReady)
{
if (!spSitMapGuiIfc->planOverlaySetContent(snapShotOverlayId, tr("Snapshot-PlanOverlay"), planOverlay, true))
{
ERROR_LOG() << Q_FUNC_INFO << " Error add planOverlay to snapshot, SnapshotId: " << snapshot.id()
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Error add planOverlay to snapshot, SnapshotId: " << snapshot.id()
<< " planOverlay.size()=" << planOverlay.size()
<< " planOverlay=" << planOverlay;
success = false;
@@ -298,16 +298,16 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
const int snapshotId = snapshot.id();
auto onMapIsReadyFn = [this, spSitMapGuiIfc, planOverlay, snapshotId]() {
INFO_LOG() << Q_FUNC_INFO << " try again: do planOverlaySetContent...";
INFO_LOG(m_logger) << Q_FUNC_INFO << " try again: do planOverlaySetContent...";
if (!spSitMapGuiIfc->planOverlaySetContent(snapShotOverlayId, tr("Snapshot-PlanOverlay"), planOverlay, true))
{
ERROR_LOG() << Q_FUNC_INFO << " Error add planOverlay to snapshot, SnapshotId: " << snapshotId
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Error add planOverlay to snapshot, SnapshotId: " << snapshotId
<< " planOverlay.size()=" << planOverlay.size()
<< " planOverlay=" << planOverlay;
}
};
if (!spSitMapGuiIfc->setMapReadyCallback(this, onMapIsReadyFn))
ERROR_LOG() << Q_FUNC_INFO << ", setMapReadyCallback failed, SnapshotId: " << snapshotId;
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", setMapReadyCallback failed, SnapshotId: " << snapshotId;
}
}
@@ -320,7 +320,7 @@ bool SnapshotDialog::showSnapshotInternal(const Snapshot &snapshot, bool bApplyF
const QByteArray ba(QByteArray::fromRawData(snapshot.movementTracks().c_str(), snapshot.movementTracks().size()));
if (!spSitMapGuiIfc->setMovementTrackManagerSettingsJSon(ba))
{
ERROR_LOG() << Q_FUNC_INFO << " Error setMovementTrackManagerSettingsJSon, SnapshotId: " << snapshot.id();
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Error setMovementTrackManagerSettingsJSon, SnapshotId: " << snapshot.id();
success = false;
}
}
@@ -367,7 +367,7 @@ void SnapshotDialog::onEditPlan()
if (!m_planEditorApp)
{
ERROR_LOG() << "Creating Plan Editor-Snapshot failed.";
ERROR_LOG(m_logger) << "Creating Plan Editor-Snapshot failed.";
return;
}
@@ -391,7 +391,7 @@ void SnapshotDialog::onEditPlan()
void SnapshotDialog::onPlaneditorFinished()
{
DEBUG_LOG() << Q_FUNC_INFO << " onPlaneditorFinished"
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " onPlaneditorFinished"
<< " m_planEditorHasUpdatedThePlan=" << m_planEditorHasUpdatedThePlan;
@@ -417,7 +417,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
auto session = m_planEditorApp->getSession(IDL::PartitionType::Replay, partitionId);
if (!session)
{
ERROR_LOG() << Q_FUNC_INFO << " Internal error - can not get previously created session!";
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Internal error - can not get previously created session!";
return;
}
@@ -436,7 +436,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
session->getForeignGuiInterface<PlanEditorPlugin::ForeignGuiInterface>(planEditorIfc);
if (!sitMapGuiIfc || !planEditorIfc)
{
WARNING_LOG() << "Can not create plan editor app - found not all required interfaces";
WARNING_LOG(m_logger) << "Can not create plan editor app - found not all required interfaces";
m_planEditorApp->deleteLater();
m_planEditorApp = nullptr;
return;
@@ -446,7 +446,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
DEBUG_LOG() << Q_FUNC_INFO << " current SnapshotId: " << m_currentSnapshot.id()
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " current SnapshotId: " << m_currentSnapshot.id()
<< ", PlanEditor - partitionId = " << partitionId;
SituationReplay::ChangeReplayStateRequest req;
@@ -459,7 +459,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
if (!m_requestHelper->startSingleRequest([req, this]() { return m_srpFtc->changeReplayStateRequest(req, this); }))
{
ERROR_LOG() << Q_FUNC_INFO << " Replay could not be started for partition id = " << partitionId;
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Replay could not be started for partition id = " << partitionId;
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Replay could not be started for partition with id %1").arg(partitionId));
m_planEditorApp->deleteLater();
return;
@@ -474,7 +474,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
const QJsonDocument jDoc(QJsonDocument::fromJson(ba, &parserError));
if (parserError.error != QJsonParseError::NoError)
{
ERROR_LOG() << "Error parsing json document: " << parserError.errorString();
ERROR_LOG(m_logger) << "Error parsing json document: " << parserError.errorString();
return;
}
@@ -483,7 +483,7 @@ void SnapshotDialog::slotReplaySessionForPlanEditorStarted()
if (oms.mode == SituationMap::Mode::Mode_3D)
{
DEBUG_LOG() << " PlanEditor in 3D not supported yet, use 2D";
DEBUG_LOG(m_logger) << " PlanEditor in 3D not supported yet, use 2D";
oms.mode = SituationMap::Mode::Mode_2D;
sitMapGuiIfc->setOperatorMapSettingsJson(oms.toJson());
} else {
@@ -534,12 +534,12 @@ void SnapshotDialog::prepareIndex(const QModelIndex &idx)
{
const MarkerManagement::Snapshot &snapshot = m_model->getRowData(idx.row());
DEBUG_LOG() << "Prepare index for snapshot with id = " << snapshot.id();
DEBUG_LOG(m_logger) << "Prepare index for snapshot with id = " << snapshot.id();
const int fileId = snapshot.fileContentId();
if (fileId > 0)
{
DEBUG_LOG() << "Loading file content with id = " << fileId;
DEBUG_LOG(m_logger) << "Loading file content with id = " << fileId;
QByteArray content;
if (m_flmGui->loadContent(fileId, content) && content.size() > 0)
@@ -551,17 +551,17 @@ void SnapshotDialog::prepareIndex(const QModelIndex &idx)
m_imageTitles.append( name + QStringLiteral(" (")+ timeStr + QStringLiteral(")"));
m_images.append(QImage::fromData(content));
DEBUG_LOG() << " title=" << m_imageTitles.last()
DEBUG_LOG(m_logger) << " title=" << m_imageTitles.last()
<< " description=" << m_descriptions.last()
<< " content.size=" << content.size();
}
else
{
ERROR_LOG() << "Cannot retrieve file content for fileId = " << fileId;
ERROR_LOG(m_logger) << "Cannot retrieve file content for fileId = " << fileId;
}
}
else
WARNING_LOG() << "Not found: file id = 0 for snapshot id = " << snapshot.id();
WARNING_LOG(m_logger) << "Not found: file id = 0 for snapshot id = " << snapshot.id();
}
@@ -572,20 +572,20 @@ void SnapshotDialog::onPrint()
m_imageTitles.clear();
m_images.clear();
DEBUG_LOG() << "selectedRows.size()=" << selectedRows.size();
DEBUG_LOG(m_logger) << "selectedRows.size()=" << selectedRows.size();
for (const QModelIndex &idx : selectedRows)
prepareIndex(idx);
if (m_images.size() > 0)
LtsPrinting::printImages(m_session, this, tr("Snapshots"), m_images, m_imageTitles, m_descriptions);
else
ERROR_LOG() << "No snapshots selected or no valid images to print";
ERROR_LOG(m_logger) << "No snapshots selected or no valid images to print";
}
bool SnapshotDialog::saveSnapshotPlan(const QByteArray &planXMLContent)
{
DEBUG_LOG() << Q_FUNC_INFO << " save snapshot";
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " save snapshot";
m_currentSnapshot.planOverlay(planXMLContent.constData());
@@ -597,7 +597,7 @@ bool SnapshotDialog::saveSnapshotPlan(const QByteArray &planXMLContent)
if (!ok)
{
ERROR_LOG() << "Error while updating snapshot plan overlay";
ERROR_LOG(m_logger) << "Error while updating snapshot plan overlay";
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Error while updating snapshot plan overlay"), tr("Saving Plan to Snapshot") );
}
else
@@ -656,7 +656,7 @@ bool SnapshotDialog::init(const std::shared_ptr<MarkerManagement::Interface::Dtc
QTimer::singleShot(1000, this, [this, spSitMapGuiIfc]() {
if (!spSitMapGuiIfc->setMapReadyCallback(this, [this]() { enaDisa(); }))
ERROR_LOG() << Q_FUNC_INFO << " setMapReadyCallback failed"
ERROR_LOG(m_logger) << Q_FUNC_INFO << " setMapReadyCallback failed"
<< ", m_session->toString " << m_session->toString()
<< ", this=" << this;
});
@@ -669,7 +669,7 @@ bool SnapshotDialog::init(const std::shared_ptr<MarkerManagement::Interface::Dtc
void SnapshotDialog::aboutToClose()
{
DEBUG_LOG() << "aboutToClose - start";
DEBUG_LOG(m_logger) << "aboutToClose - start";
if (m_planEditorApp)
{
m_planEditorApp->disconnect(this);
@@ -778,7 +778,7 @@ void SnapshotDialog::onEditMetaData()
if (snapshot.id() <= 0)
return;
INFO_LOG() << "current SnapshotId: " << snapshot.id();
INFO_LOG(m_logger) << "current SnapshotId: " << snapshot.id();
if (snapshot.operatorId() == LtsSessionData::LtsSessionData::getInstance()->getOperatorId())
{
@@ -874,7 +874,7 @@ void SnapshotDialog::saveSnapshotFilter()
auto spSitMapGuiIfc = m_sitMapGuiIfc.lock();
if (!spSitMapGuiIfc)
{
ERROR_LOG() << Q_FUNC_INFO << ", no m_sitMapGuiIfc, return";
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", no m_sitMapGuiIfc, return";
return;
}
@@ -886,7 +886,7 @@ void SnapshotDialog::saveSnapshotFilter()
req.mapSettings(mapSettings.data());
req.operatorId(LtsSessionData::LtsSessionData::getInstance()->getOperatorId());
DEBUG_LOG() << "File content id (of preview image) = " << m_currentSnapshot.fileContentId();
DEBUG_LOG(m_logger) << "File content id (of preview image) = " << m_currentSnapshot.fileContentId();
req.fileContentId(m_fileId);
@@ -902,7 +902,7 @@ void SnapshotDialog::saveSnapshotFilter()
if (!m_requestHelper->startSingleRequest([req, this]() { return m_mrkFtc->snapshotModifyRequest(req, this);}))
ERROR_LOG() << "Saving snapshot filter failed";
ERROR_LOG(m_logger) << "Saving snapshot filter failed";
else
{
__unchange__();
@@ -935,12 +935,12 @@ void SnapshotDialog::saveSnapshotPreviewInLibrary(const QString &snapshotTitle)
.arg(LtsSessionData::LtsSessionData::getInstance()->getOperatorId())
.arg(snapshotTitle.left(20));
DEBUG_LOG() << "saveSnapshotPreviewInLibrary: " << title;
DEBUG_LOG(m_logger) << "saveSnapshotPreviewInLibrary: " << title;
auto spSitMapGuiIfc = m_sitMapGuiIfc.lock();
if (!spSitMapGuiIfc->isMapReady())
{
ERROR_LOG() << Q_FUNC_INFO << " sitMapGuiInterface not ready";
ERROR_LOG(m_logger) << Q_FUNC_INFO << " sitMapGuiInterface not ready";
return;
}
@@ -966,7 +966,7 @@ void SnapshotDialog::saveSnapshotPreviewInLibrary(const QString &snapshotTitle)
snapshotFolderId = m_flmDtc->findFolder(initialFolderId, QStringLiteral("Snapshots"));
}
DEBUG_LOG() << "Initial folder Id = " << initialFolderId
DEBUG_LOG(m_logger) << "Initial folder Id = " << initialFolderId
<< " snapshotFolderId =" << snapshotFolderId;
const int folderId = snapshotFolderId > 0 ? snapshotFolderId : initialFolderId;
@@ -995,17 +995,17 @@ void SnapshotDialog::saveSnapshotPreviewInLibrary(const QString &snapshotTitle)
}))
{
m_fileId = m_requestHelper->getRepliedId();
DEBUG_LOG() << Q_FUNC_INFO << " Saved file in library with id = " << m_fileId;
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " Saved file in library with id = " << m_fileId;
saveSnapshotFilter();
if (m_currentSnapshot.fileContentId() != m_fileId)
{
DEBUG_LOG() << Q_FUNC_INFO << " One more request needed!";
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " One more request needed!";
m_currentSnapshot.fileContentId(m_fileId);
}
} else {
ERROR_LOG() << Q_FUNC_INFO << " Saved file in library with id = " << m_fileId << " failed";
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Saved file in library with id = " << m_fileId << " failed";
}
@@ -63,6 +63,7 @@ public:
void showSnapshot();
protected:
NGL::INGLLogger &m_logger;
void onSnapshotRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
void onReplayPartitionRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject);}
void onChangeReplayStateReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject);}
@@ -80,6 +81,7 @@ public:
void onSymbolAppearanceUpdateReply(const Core::FunctionReplyObject &reply) override final { m_requestHelper->requestReply(reply); }
protected:
NGL::INGLLogger &m_logger;
void aboutToClose() override;
private slots:
void enaDisa();
@@ -182,7 +182,7 @@ void SnapshotDialogModel::loadPreview(int fileContentId, int rowId)
QByteArray byteArray;
if (m_flmGui->loadContent(fileContentId, byteArray, true) && byteArray.size() > 0)
{
DEBUG_LOG() << "m_previews.insert fileContentId=" << fileContentId
DEBUG_LOG(m_logger) << "m_previews.insert fileContentId=" << fileContentId
<< " size Preview=" << byteArray.size();
QImage img = LtsUtils::getImage(byteArray);