Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+3
-3
@@ -57,7 +57,7 @@ ScriptChooser::ScriptChooser(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
PresentationManagementDialogModel::Columns::Operator, QVariant(LtsSessionData::LtsSessionData::getInstance()->getOperatorId())
|
||||
);
|
||||
if (!bSetOperator)
|
||||
WARNING_LOG() << "could not set initial operator id to " << operatorId;
|
||||
WARNING_LOG(m_logger) << "could not set initial operator id to " << operatorId;
|
||||
|
||||
connect(m_ui->ltsDataView, &LtsDataView::LtsDataView::signalSelectionChanged,
|
||||
this, &ScriptChooser::onEnaDisa, Qt::QueuedConnection);
|
||||
@@ -186,7 +186,7 @@ void ScriptChooser::onDeleteScript()
|
||||
req.fileStatus(fs);
|
||||
req.operatorId(LtsSessionData::LtsSessionData::getInstance()->getOperatorId());
|
||||
req.lastModified(QDateTime::currentMSecsSinceEpoch());
|
||||
DEBUG_LOG() << "Changing status for presentation id = " << pre.id();
|
||||
DEBUG_LOG(m_logger) << "Changing status for presentation id = " << pre.id();
|
||||
|
||||
m_requestHelper->startSingleRequest([this, req]()
|
||||
{
|
||||
@@ -197,7 +197,7 @@ void ScriptChooser::onDeleteScript()
|
||||
m_ui->ltsDataView->proxyModel()->removeRow(srcIdx.row());
|
||||
|
||||
if (m_requestHelper->failed())
|
||||
ERROR_LOG() << "Failed to change status for presentation-script_chooser";
|
||||
ERROR_LOG(m_logger) << "Failed to change status for presentation-script_chooser";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -38,6 +38,7 @@ public:
|
||||
~ScriptChooser();
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void onPresentationRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
void onPresentationChangeStatusReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
|
||||
+5
-5
@@ -41,17 +41,17 @@ bool DbReader::loadPlugin(const LtsPluginManager::PluginInstance &pi)
|
||||
RecordReplay::RecordReplayPlugin *recPlugin = qobject_cast<RecordReplay::RecordReplayPlugin*>(pi.plugin);
|
||||
if (!recPlugin)
|
||||
{
|
||||
ERROR_LOG() << "Cannot load RecordReplayPlugin " << pi.fileName;
|
||||
ERROR_LOG(m_logger) << "Cannot load RecordReplayPlugin " << pi.fileName;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!recPlugin->initCopy(m_exerciseId, m_bSupportsSchemasFrom, m_bSupportsSchemasTo))
|
||||
{
|
||||
ERROR_LOG() << "Initialisation for RecordReplayPlugin " << pi.fileName << " failed ";
|
||||
ERROR_LOG(m_logger) << "Initialisation for RecordReplayPlugin " << pi.fileName << " failed ";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "Loaded record replay plugin " << recPlugin->pluginName();
|
||||
INFO_LOG(m_logger) << "Loaded record replay plugin " << recPlugin->pluginName();
|
||||
m_plugins += recPlugin;
|
||||
|
||||
return true;
|
||||
@@ -89,7 +89,7 @@ bool DbReader::createTables()
|
||||
|
||||
if (record.isEmpty())
|
||||
{
|
||||
ERROR_LOG() << "Empty record for " << fqTableName;
|
||||
ERROR_LOG(m_logger) << "Empty record for " << fqTableName;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ bool DbReader::createTables()
|
||||
|
||||
bool DbReader::copyData(qint64 fromTime, qint64 toTime)
|
||||
{
|
||||
INFO_LOG() << "IN readData";
|
||||
INFO_LOG(m_logger) << "IN readData";
|
||||
if (!m_queryFrom || !m_queryTo)
|
||||
return false;
|
||||
|
||||
|
||||
+2
@@ -30,8 +30,10 @@ public:
|
||||
|
||||
static bool createTable(NSqlQuery &q, const QString &tableName, const QSqlRecord &record, const QSqlIndex &pk, NGL::INGLLogger &logger);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool loadPlugin(const LtsPluginManager::PluginInstance &pi);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_exerciseId;
|
||||
QSqlDatabase m_dbFrom;
|
||||
QSqlDatabase m_dbTo;
|
||||
|
||||
+8
-8
@@ -61,12 +61,12 @@ void DVDWriter::incomingDataAvailable()
|
||||
while (m_dvdBurnProcess && m_dvdBurnProcess->canReadLine())
|
||||
{
|
||||
const QByteArray qB = m_dvdBurnProcess->readLine().trimmed();
|
||||
INFO_LOG() << "qb = " << qB.data()
|
||||
INFO_LOG(m_logger) << "qb = " << qB.data()
|
||||
<< " m_packageDir=" << m_packageDir;
|
||||
|
||||
if (qB.contains(":-["))
|
||||
{
|
||||
ERROR_LOG() << "growisofs error: '" << qB << "'";
|
||||
ERROR_LOG(m_logger) << "growisofs error: '" << qB << "'";
|
||||
cleanupProcess();
|
||||
|
||||
QString errString = QString::fromUtf8(qB.mid(3));
|
||||
@@ -108,7 +108,7 @@ void DVDWriter::incomingDataAvailable()
|
||||
m_pProgressDlg->setValue(100);
|
||||
else if (qB.contains("media is not recognized"))
|
||||
{
|
||||
ERROR_LOG() << "growisofs error: '" << qB << "'";
|
||||
ERROR_LOG(m_logger) << "growisofs error: '" << qB << "'";
|
||||
cleanupProcess();
|
||||
|
||||
if (LtsWidgets::LtsMessageDialog::showMessage(qobject_cast<QWidget *>(parent()), tr("No DVD in drive. Try again?"),
|
||||
@@ -122,7 +122,7 @@ void DVDWriter::incomingDataAvailable()
|
||||
}
|
||||
else if (qB.contains(":-( unable to open"))
|
||||
{
|
||||
ERROR_LOG() << "growisofs error: '" << qB << "'";
|
||||
ERROR_LOG(m_logger) << "growisofs error: '" << qB << "'";
|
||||
cleanupProcess();
|
||||
|
||||
if (LtsWidgets::LtsMessageDialog::showMessage(qobject_cast<QWidget *>(parent()), tr("Unable to open DVD device. Try again?"),
|
||||
@@ -136,7 +136,7 @@ void DVDWriter::incomingDataAvailable()
|
||||
}
|
||||
else if (qB.contains(":-("))
|
||||
{
|
||||
ERROR_LOG() << "growisofs error: '" << qB << "'";
|
||||
ERROR_LOG(m_logger) << "growisofs error: '" << qB << "'";
|
||||
cleanupProcess();
|
||||
|
||||
QString strError(tr("Unable to open DVD device"));
|
||||
@@ -159,12 +159,12 @@ void DVDWriter::incomingDataAvailable()
|
||||
void DVDWriter::dvdFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
|
||||
INFO_LOG() << "growisofs ends with extitCode : '" << exitCode << " and ExitStatus '" << exitStatus;
|
||||
INFO_LOG(m_logger) << "growisofs ends with extitCode : '" << exitCode << " and ExitStatus '" << exitStatus;
|
||||
|
||||
|
||||
if (!m_dvdBurnProcess)
|
||||
{
|
||||
WARNING_LOG() << "dvdFinished with error code: " << exitCode << ", status: " << exitStatus
|
||||
WARNING_LOG(m_logger) << "dvdFinished with error code: " << exitCode << ", status: " << exitStatus
|
||||
<< " process is already cleaned up";
|
||||
return;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ void DVDWriter::dvdFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "dvdFinished with error code: " << exitCode << ", status: " << exitStatus;
|
||||
ERROR_LOG(m_logger) << "dvdFinished with error code: " << exitCode << ", status: " << exitStatus;
|
||||
LtsWidgets::LtsMessageDialog::showMessage(qobject_cast<QWidget *>(parent()), tr("Burning aborted with an unkown error %1").arg(exitCode));
|
||||
cleanup(false);
|
||||
}
|
||||
|
||||
+2
@@ -33,6 +33,8 @@ private slots:
|
||||
void dvdFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void cleanup(bool success);
|
||||
void cleanupProcess();
|
||||
bool checkBuringCapabilities();
|
||||
|
||||
+19
-19
@@ -112,7 +112,7 @@ void ExportProcess::slotStartExport()
|
||||
auto it = m_trackEntryAssignments.constFind(QString::fromStdString(content.presentationTopicType()));
|
||||
if (it == m_trackEntryAssignments.constEnd())
|
||||
{
|
||||
ERROR_LOG() << "Invalid content for type (" << content.presentationTopicType() << "): " << QString::fromStdString(content.presentationTopicType());
|
||||
ERROR_LOG(m_logger) << "Invalid content for type (" << content.presentationTopicType() << "): " << QString::fromStdString(content.presentationTopicType());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ void ExportProcess::slotStartExport()
|
||||
|
||||
if (it == m_trackEntryAssignments.constEnd())
|
||||
{
|
||||
ERROR_LOG() << "Invalid content for presentation type " << content.presentationTopicType();
|
||||
ERROR_LOG(m_logger) << "Invalid content for presentation type " << content.presentationTopicType();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ QVector<ExportStep *> ExportProcess::checkAdditionalExportEntries(
|
||||
addData.id = parentData.id;
|
||||
|
||||
auto topicExportIfc = topicIfcFromType(addData.topicType, ExportOrReplay::Export);
|
||||
DEBUG_LOG() << "addEntry type: " << addData.topicType << ", ifc: " << topicExportIfc;
|
||||
DEBUG_LOG(m_logger) << "addEntry type: " << addData.topicType << ", ifc: " << topicExportIfc;
|
||||
if (!topicExportIfc)
|
||||
continue;
|
||||
|
||||
@@ -264,7 +264,7 @@ QVector<ExportStep *> ExportProcess::checkAdditionalExportEntries(
|
||||
ret += createExportStep(realParentId, addData, topicExportIfc, allSitReplayTimes);
|
||||
m_cntTopicsToExport++;
|
||||
}
|
||||
DEBUG_LOG() << "topic count: " << m_cntTopicsToExport;
|
||||
DEBUG_LOG(m_logger) << "topic count: " << m_cntTopicsToExport;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ ExportStep *ExportProcess::createExportStep(
|
||||
connect(pExportStep, &TakeHomePackageGenerator::ExportStep::signalExportFailed,
|
||||
this, &ExportProcess::slotRunExportStep, Qt::QueuedConnection);
|
||||
|
||||
DEBUG_LOG() << "Adding filter step " << data.topicType;
|
||||
DEBUG_LOG(m_logger) << "Adding filter step " << data.topicType;
|
||||
return pExportStep;
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ TopicReplay::Interface *ExportProcess::topicIfcFromType(TopicEditorBase::TopicTy
|
||||
auto it = m_trackEntryAssignments.constFind(TopicEditorBase::topicTypeString(type));
|
||||
if (it == m_trackEntryAssignments.constEnd())
|
||||
{
|
||||
WARNING_LOG() << "Invalid content for presentation type " << type;
|
||||
WARNING_LOG(m_logger) << "Invalid content for presentation type " << type;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ TopicReplay::Interface *ExportProcess::topicIfcFromType(TopicEditorBase::TopicTy
|
||||
TopicReplay::Interface *topicIfc = exportOrReplay == ExportOrReplay::Export ? ta.topicExportFactory->createInterface(ta.topicType)
|
||||
: ta.topicReplayFactory->createInterface(ta.topicType);
|
||||
if (!topicIfc)
|
||||
WARNING_LOG() << "Could not find replay interface for " << type;
|
||||
WARNING_LOG(m_logger) << "Could not find replay interface for " << type;
|
||||
return topicIfc;
|
||||
}
|
||||
|
||||
@@ -319,13 +319,13 @@ void ExportProcess::slotRunExportStep()
|
||||
{
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
DEBUG_LOG() << "ExportProcess::slotRunExportStep() CALLED, m_vecExportSteps.size(): " << m_vecExportSteps.size()
|
||||
DEBUG_LOG(m_logger) << "ExportProcess::slotRunExportStep() CALLED, m_vecExportSteps.size(): " << m_vecExportSteps.size()
|
||||
<< ", m_vecExportStepsExecuted.size(): " << m_vecExportStepsExecuted.size();
|
||||
|
||||
for (const auto &s : std::as_const(m_vecExportSteps))
|
||||
DEBUG_LOG() << "m_vecExportSteps: " << s << " compare: " << (s == sender());
|
||||
DEBUG_LOG(m_logger) << "m_vecExportSteps: " << s << " compare: " << (s == sender());
|
||||
for (const auto &s : std::as_const(m_vecExportStepsExecuted))
|
||||
DEBUG_LOG() << "m_vecExportStepsExecuted: " << s << " compare: " << (s == sender());
|
||||
DEBUG_LOG(m_logger) << "m_vecExportStepsExecuted: " << s << " compare: " << (s == sender());
|
||||
}
|
||||
|
||||
if (m_pProgressDlg->wasCanceled())
|
||||
@@ -346,7 +346,7 @@ void ExportProcess::slotRunExportStep()
|
||||
.arg(TopicEditorBase::topicTypeString(pExportStep->m_topicData.topicType))
|
||||
.arg(m_vecExportStepsExecuted.size())
|
||||
.arg(m_cntTopicsToExport));
|
||||
DEBUG_LOG() << strExportLabel;
|
||||
DEBUG_LOG(m_logger) << strExportLabel;
|
||||
m_pProgressDlg->setLabelText(strExportLabel);
|
||||
|
||||
QString strExportPath(contentPath() + QString::number(pExportStep->topicId()) + QLatin1Char('/'));
|
||||
@@ -438,11 +438,11 @@ void ExportProcess::createDataJson(const std::shared_ptr<ExerciseManagement::Int
|
||||
{
|
||||
|
||||
{
|
||||
DEBUG_LOG() << "Add exercise to ExportRootPath";
|
||||
DEBUG_LOG(m_logger) << "Add exercise to ExportRootPath";
|
||||
QFile file(exportRootPath() + QStringLiteral("exercises.json"));
|
||||
if (!file.open(QFile::ReadWrite))
|
||||
{
|
||||
WARNING_LOG() << "Can not open " << file.fileName() << " for read/write: " << file.errorString();
|
||||
WARNING_LOG(m_logger) << "Can not open " << file.fileName() << " for read/write: " << file.errorString();
|
||||
return;
|
||||
}
|
||||
QJsonDocument doc(QJsonDocument::fromJson(file.readAll()));
|
||||
@@ -453,12 +453,12 @@ void ExportProcess::createDataJson(const std::shared_ptr<ExerciseManagement::Int
|
||||
obj[QStringLiteral("Exercises")] = arr;
|
||||
file.resize(0);
|
||||
file.write(QJsonDocument(obj).toJson(QJsonDocument::Indented));
|
||||
INFO_LOG() << " file.write " << QJsonDocument(obj).toJson(QJsonDocument::Indented);
|
||||
INFO_LOG(m_logger) << " file.write " << QJsonDocument(obj).toJson(QJsonDocument::Indented);
|
||||
file.close();
|
||||
}
|
||||
|
||||
QFile file(exportPath(m_pSession->exerciseId()) + QStringLiteral("data.json"));
|
||||
INFO_LOG() << "ExportProcess::createDataJson " << exportPath(m_pSession->exerciseId()) + QStringLiteral("data.json");
|
||||
INFO_LOG(m_logger) << "ExportProcess::createDataJson " << exportPath(m_pSession->exerciseId()) + QStringLiteral("data.json");
|
||||
if (!file.open(QFile::ReadWrite))
|
||||
return;
|
||||
|
||||
@@ -507,7 +507,7 @@ void ExportProcess::createDataJson(const std::shared_ptr<ExerciseManagement::Int
|
||||
}
|
||||
file.resize(0);
|
||||
file.write(QJsonDocument(obj).toJson(QJsonDocument::Indented));
|
||||
INFO_LOG() << " file.write " << QJsonDocument(obj).toJson(QJsonDocument::Indented);
|
||||
INFO_LOG(m_logger) << " file.write " << QJsonDocument(obj).toJson(QJsonDocument::Indented);
|
||||
file.close();
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ void ExportProcess::createPresentationTable()
|
||||
{
|
||||
if (s->exportFailed())
|
||||
{
|
||||
WARNING_LOG() << "Export failed for " << s->topicId();
|
||||
WARNING_LOG(m_logger) << "Export failed for " << s->topicId();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -620,9 +620,9 @@ void ExportProcess::copyStaticContent() const
|
||||
QString exportPathStr = exportPath(m_pSession->exerciseId());
|
||||
exportPathStr.truncate(exportPathStr.size() - 1);
|
||||
if (!NGL::copyDirContentsToDir(QStringLiteral("thp"), exportPathStr, true))
|
||||
WARNING_LOG() << "Could not find thp static content directory exportPath=" << exportPathStr;
|
||||
WARNING_LOG(m_logger) << "Could not find thp static content directory exportPath=" << exportPathStr;
|
||||
if (!NGL::copyDirContentsToDir(QStringLiteral("thp_standalone"), exportPathStr + QDir::separator() + QString::number(m_scriptId), true))
|
||||
WARNING_LOG() << "Could not find thp_standalone static content directory exportPath=" << exportPathStr + QDir::separator() + QString::number(m_scriptId);
|
||||
WARNING_LOG(m_logger) << "Could not find thp_standalone static content directory exportPath=" << exportPathStr + QDir::separator() + QString::number(m_scriptId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -70,6 +70,7 @@ private slots:
|
||||
void slotRunExportStep();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVector<ExportStep *> parseFilterSteps(
|
||||
int parentTopicId, QJsonObject &detailData, const QVector<TopicReplay::Interface::SituationReplayTime> &allSitReplayTimes
|
||||
);
|
||||
@@ -101,6 +102,7 @@ private:
|
||||
void copyStaticContent() const;
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVector<ExportStep *> m_vecExportSteps;
|
||||
QVector<ExportStep *> m_vecExportStepsExecuted;
|
||||
|
||||
|
||||
+11
-11
@@ -41,7 +41,7 @@ SituationExporter::~SituationExporter()
|
||||
|
||||
bool SituationExporter::exportStaticData(const QString &strPathToFile)
|
||||
{
|
||||
DEBUG_LOG() << "Exporting static data to " << strPathToFile;
|
||||
DEBUG_LOG(m_logger) << "Exporting static data to " << strPathToFile;
|
||||
m_dbIn.close();
|
||||
m_dbOut.close();
|
||||
|
||||
@@ -106,7 +106,7 @@ bool SituationExporter::exportStaticData(const QString &strPathToFile)
|
||||
{
|
||||
if (!copyTable(t, false))
|
||||
{
|
||||
ERROR_LOG() << "Copying table " << t.schema << "." << t.table << " failed... ";
|
||||
ERROR_LOG(m_logger) << "Copying table " << t.schema << "." << t.table << " failed... ";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@ bool SituationExporter::exportStaticData(const QString &strPathToFile)
|
||||
{
|
||||
if (!copyTable(t, true))
|
||||
{
|
||||
ERROR_LOG() << "Copying table " << t.schema << "." << t.table << " failed... ";
|
||||
ERROR_LOG(m_logger) << "Copying table " << t.schema << "." << t.table << " failed... ";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -160,11 +160,11 @@ bool SituationExporter::copyTable(const StaticTableToCopy &t, bool bOnlyCreateSc
|
||||
|
||||
const QString fqTableName(t.schema.isEmpty() ? t.table : (t.schema + QLatin1Char('.') + t.table));
|
||||
|
||||
DEBUG_LOG() << "Copying " << fqTableName << " started";
|
||||
DEBUG_LOG(m_logger) << "Copying " << fqTableName << " started";
|
||||
const QSqlRecord record = m_dbIn.record(fqTableName);
|
||||
if (record.isEmpty())
|
||||
{
|
||||
ERROR_LOG() << "Empty record for " << fqTableName;
|
||||
ERROR_LOG(m_logger) << "Empty record for " << fqTableName;
|
||||
return false;
|
||||
}
|
||||
QStringList selectTableColumns;
|
||||
@@ -197,17 +197,17 @@ bool SituationExporter::copyTable(const StaticTableToCopy &t, bool bOnlyCreateSc
|
||||
selectTableColumns.join(QStringLiteral(", ")),
|
||||
insertTablePlaceholder.join(QStringLiteral(", "))));
|
||||
|
||||
DEBUG_LOG() << selectTableCommand;
|
||||
DEBUG_LOG() << insertTableCommand;
|
||||
DEBUG_LOG(m_logger) << selectTableCommand;
|
||||
DEBUG_LOG(m_logger) << insertTableCommand;
|
||||
|
||||
if (!qOut.prepare(insertTableCommand))
|
||||
{
|
||||
ERROR_LOG() << "qOut prepare failed... " << qOut.lastError().text();
|
||||
ERROR_LOG(m_logger) << "qOut prepare failed... " << qOut.lastError().text();
|
||||
return false;
|
||||
}
|
||||
if (!qIn.exec(selectTableCommand))
|
||||
{
|
||||
ERROR_LOG() << "qIn select failed... " << qIn.lastError().text();
|
||||
ERROR_LOG(m_logger) << "qIn select failed... " << qIn.lastError().text();
|
||||
return false;
|
||||
}
|
||||
while (qIn.next())
|
||||
@@ -216,11 +216,11 @@ bool SituationExporter::copyTable(const StaticTableToCopy &t, bool bOnlyCreateSc
|
||||
qOut.bindValue(insertTablePlaceholder.at(i), qIn.value(i));
|
||||
if (!qOut.exec())
|
||||
{
|
||||
ERROR_LOG() << "qOut insert failed.. " << qOut.lastError().text();
|
||||
ERROR_LOG(m_logger) << "qOut insert failed.. " << qOut.lastError().text();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
DEBUG_LOG() << "Copying " << fqTableName << " finished";
|
||||
DEBUG_LOG(m_logger) << "Copying " << fqTableName << " finished";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
@@ -18,6 +18,7 @@ public:
|
||||
bool exportDynamicData(qint64 fromTime, qint64 toTime);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
struct StaticTableToCopy
|
||||
{
|
||||
QString schema;
|
||||
@@ -27,6 +28,7 @@ private:
|
||||
|
||||
bool copyTable(const StaticTableToCopy &t, bool bOnlyCreateSchema);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_exerciseId;
|
||||
QSqlDatabase m_dbIn;
|
||||
QSqlDatabase m_dbOut;
|
||||
|
||||
+106
-106
@@ -309,7 +309,7 @@ void ScriptDialog::slotTrackEntryDeleted(const int topicId)
|
||||
|
||||
if (m_currentTopicEditor != nullptr && m_currentTopicEditor->topicId() == topicId)
|
||||
{
|
||||
ERROR_LOG() << "slotTrackEntryDeleted" << topicId << "editor" << m_currentTopicEditor->topicId();
|
||||
ERROR_LOG(m_logger) << "slotTrackEntryDeleted" << topicId << "editor" << m_currentTopicEditor->topicId();
|
||||
m_currentTopicEditor->deleteLater();
|
||||
m_currentTopicEditor = nullptr;
|
||||
}
|
||||
@@ -347,7 +347,7 @@ void ScriptDialog::slotEditEntry(const int topicId)
|
||||
}
|
||||
}
|
||||
|
||||
ERROR_LOG() << "could not find coresponding track entry with id " << topicId;
|
||||
ERROR_LOG(m_logger) << "could not find coresponding track entry with id " << topicId;
|
||||
}
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@ void ScriptDialog::startEssentialsViewStage2(const Core::ReplayPartition &replay
|
||||
|
||||
if (m_essentialsViewSession == nullptr)
|
||||
{
|
||||
WARNING_LOG() << "no session for m_essentialsViewSession";
|
||||
WARNING_LOG(m_logger) << "no session for m_essentialsViewSession";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Essentials View was not properly initialized"), tr("Essentials View Session"));
|
||||
m_essentialsViewApp->deleteLater();
|
||||
m_essentialsViewApp = nullptr;
|
||||
@@ -433,13 +433,13 @@ void ScriptDialog::startEssentialsViewStage2(const Core::ReplayPartition &replay
|
||||
connect(m_essentialsViewSession, &LtsSession::LtsSession::destroyed, applyFilterPtr, [applyFilter]() { delete applyFilter; });
|
||||
|
||||
sitMapFilterIfc->setApplyFilter(applyFilter);
|
||||
DEBUG_LOG() << "set filter topic editor's flt ifc to essentials view's flt ifc";
|
||||
DEBUG_LOG(m_logger) << "set filter topic editor's flt ifc to essentials view's flt ifc";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "cannot set filter topic editor's flt ifc to essentials view's flt ifc - cannot find topic editor";
|
||||
WARNING_LOG(m_logger) << "cannot set filter topic editor's flt ifc to essentials view's flt ifc - cannot find topic editor";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "cannot set filter topic editor's flt ifc to essentials view's flt ifc - cannot find essentials view's flt ifc";
|
||||
WARNING_LOG(m_logger) << "cannot set filter topic editor's flt ifc to essentials view's flt ifc - cannot find essentials view's flt ifc";
|
||||
}
|
||||
|
||||
|
||||
@@ -458,13 +458,13 @@ void ScriptDialog::startEssentialsViewStage2(const Core::ReplayPartition &replay
|
||||
sitMapFilterGuiIfc->setSitMapGuiIfc(nullptr);
|
||||
});
|
||||
|
||||
DEBUG_LOG() << "set sit map filter gui ifc's sit map gui ifc to essential view's sit map gui ifc";
|
||||
DEBUG_LOG(m_logger) << "set sit map filter gui ifc's sit map gui ifc to essential view's sit map gui ifc";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "unable to initialize situation map filter gui plugin - sit map filter gui ifc";
|
||||
WARNING_LOG(m_logger) << "unable to initialize situation map filter gui plugin - sit map filter gui ifc";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "unable to initialize situation map filter gui plugin - sit map gui ifc missing!";
|
||||
WARNING_LOG(m_logger) << "unable to initialize situation map filter gui plugin - sit map gui ifc missing!";
|
||||
}
|
||||
|
||||
|
||||
@@ -478,13 +478,13 @@ void ScriptDialog::startEssentialsViewStage2(const Core::ReplayPartition &replay
|
||||
thisSrpGuiIfc->setSrpIfc(m_essentialsViewsSrpGuiIfc.get());
|
||||
connect(m_essentialsViewSession, &LtsSession::LtsSession::destroyed, this, [thisSrpGuiIfc]() { thisSrpGuiIfc->setSrpIfc(nullptr); });
|
||||
connect(m_essentialsViewSession, &LtsSession::LtsSession::signalClose, this, [this]() { m_essentialsViewsSrpGuiIfc = nullptr; });
|
||||
DEBUG_LOG() << "set srp gui ifc's srp gui ifc to essential view's srp gui ifc";
|
||||
DEBUG_LOG(m_logger) << "set srp gui ifc's srp gui ifc to essential view's srp gui ifc";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "unable to initialize srp gui plugin - this srp gui ifc missing!";
|
||||
WARNING_LOG(m_logger) << "unable to initialize srp gui plugin - this srp gui ifc missing!";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "unable to initialize srp gui plugin - essentials view's srp gui ifc missing!";
|
||||
WARNING_LOG(m_logger) << "unable to initialize srp gui plugin - essentials view's srp gui ifc missing!";
|
||||
|
||||
|
||||
|
||||
@@ -496,10 +496,10 @@ void ScriptDialog::startEssentialsViewStage2(const Core::ReplayPartition &replay
|
||||
{
|
||||
thisPlanOverlayGuiIfc->setForeignPlanOverlaysGuiIfc(essentialsViewPlanOverlaysGuiIfc.get());
|
||||
connect(m_essentialsViewSession, &LtsSession::LtsSession::destroyed, this, [thisPlanOverlayGuiIfc]() { thisPlanOverlayGuiIfc->setForeignPlanOverlaysGuiIfc(nullptr); });
|
||||
WARNING_LOG() << "set this plan overlay's own gui ifc to essential view's plan overlays gui ifc";
|
||||
WARNING_LOG(m_logger) << "set this plan overlay's own gui ifc to essential view's plan overlays gui ifc";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "unable to initialize plan overlays gui plugin - essential view's plan overlays gui ifc missing!";
|
||||
WARNING_LOG(m_logger) << "unable to initialize plan overlays gui plugin - essential view's plan overlays gui ifc missing!";
|
||||
|
||||
|
||||
std::shared_ptr<SituationMap::ForeignGuiInterface> essentialsViewSitMapGuiIfc;
|
||||
@@ -507,13 +507,13 @@ void ScriptDialog::startEssentialsViewStage2(const Core::ReplayPartition &replay
|
||||
{
|
||||
thisPlanOverlayGuiIfc->setForeignSitMapGuiIfc(essentialsViewSitMapGuiIfc.get());
|
||||
connect(m_essentialsViewSession, &LtsSession::LtsSession::destroyed, this, [thisPlanOverlayGuiIfc]() { thisPlanOverlayGuiIfc->setForeignSitMapGuiIfc(nullptr); });
|
||||
DEBUG_LOG() << "set this plan overlay's sitMap gui ifc to essential view's sitMap gui ifc";
|
||||
DEBUG_LOG(m_logger) << "set this plan overlay's sitMap gui ifc to essential view's sitMap gui ifc";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "unable to initialize sitMap gui plugin - essential view's sitMap gui ifc missing!";
|
||||
WARNING_LOG(m_logger) << "unable to initialize sitMap gui plugin - essential view's sitMap gui ifc missing!";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "unable to initialize plan overlay gui plugin - this plan overlay gui ifc missing!";
|
||||
WARNING_LOG(m_logger) << "unable to initialize plan overlay gui plugin - this plan overlay gui ifc missing!";
|
||||
|
||||
|
||||
|
||||
@@ -521,10 +521,10 @@ void ScriptDialog::startEssentialsViewStage2(const Core::ReplayPartition &replay
|
||||
if (m_essentialsViewSession->getForeignGuiInterface<BuildingViewer::ForeignGuiInterface>(bgvIfc))
|
||||
{
|
||||
bgvIfc->initTopicEditor();
|
||||
DEBUG_LOG() << "set bgv gui ifc's session";
|
||||
DEBUG_LOG(m_logger) << "set bgv gui ifc's session";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "unable to set bgv gui ifc's session - essentials view's bgv ifc missing!";
|
||||
WARNING_LOG(m_logger) << "unable to set bgv gui ifc's session - essentials view's bgv ifc missing!";
|
||||
});
|
||||
}
|
||||
|
||||
@@ -567,7 +567,7 @@ void ScriptDialog::slotStartEssentialsView()
|
||||
this, [this, replayId, t]()
|
||||
{
|
||||
int tries = t->property("tries").toInt();
|
||||
INFO_LOG() << "try # " << tries;
|
||||
INFO_LOG(m_logger) << "try # " << tries;
|
||||
|
||||
Core::ReplayPartition replay = m_coreDtc->replayPartition(replayId);
|
||||
|
||||
@@ -670,7 +670,7 @@ void ScriptDialog::slotSetTopicPosition(QWidget *previewWidget, int ignoreTopicF
|
||||
|
||||
if (thaRealTe == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "te not found: " << topicId;
|
||||
ERROR_LOG(m_logger) << "te not found: " << topicId;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -875,7 +875,7 @@ void ScriptDialog::getPresentationContent()
|
||||
|
||||
if (contentList.size() < 1)
|
||||
{
|
||||
WARNING_LOG() << "No content for Script Id = " << m_scriptId;
|
||||
WARNING_LOG(m_logger) << "No content for Script Id = " << m_scriptId;
|
||||
setUnchangeable(false);
|
||||
return;
|
||||
}
|
||||
@@ -889,7 +889,7 @@ void ScriptDialog::getPresentationContent()
|
||||
auto tea = m_trackEntryAssignments.constFind(QString::fromStdString(content.presentationTopicType()));
|
||||
if (tea == m_trackEntryAssignments.constEnd())
|
||||
{
|
||||
ERROR_LOG() << "Invalid content for type " << QString::fromStdString(content.presentationTopicType());
|
||||
ERROR_LOG(m_logger) << "Invalid content for type " << QString::fromStdString(content.presentationTopicType());
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -903,7 +903,7 @@ void ScriptDialog::getPresentationContent()
|
||||
|
||||
if (!m_ui->widget->addTopic(te))
|
||||
{
|
||||
WARNING_LOG() << "couldn't load topic #" << te->m_topicId;
|
||||
WARNING_LOG(m_logger) << "couldn't load topic #" << te->m_topicId;
|
||||
delete te;
|
||||
}
|
||||
}
|
||||
@@ -920,13 +920,13 @@ void ScriptDialog::getPresentationContent()
|
||||
|
||||
m_requestHelper = new LtsUtils::RequestHelper(this);
|
||||
|
||||
DEBUG_LOG() << "waiting for script content..";
|
||||
DEBUG_LOG(m_logger) << "waiting for script content..";
|
||||
if (!m_requestHelper->startSingleRequest([this]()
|
||||
{
|
||||
return m_ftc->getPresentationContentRequest(GetPresentationContentRequest(m_scriptId), this);
|
||||
}, handlePresentationContent))
|
||||
{
|
||||
ERROR_LOG() << "Cannot retrieve Presentation Content for ScriptId = " << m_scriptId;
|
||||
ERROR_LOG(m_logger) << "Cannot retrieve Presentation Content for ScriptId = " << m_scriptId;
|
||||
|
||||
setUnchangeable(false);
|
||||
}
|
||||
@@ -1019,7 +1019,7 @@ void ScriptDialog::startReplaySession()
|
||||
|
||||
if (replayId < 1)
|
||||
{
|
||||
ERROR_LOG() << "replayId < 1";
|
||||
ERROR_LOG(m_logger) << "replayId < 1";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
@@ -1058,7 +1058,7 @@ void ScriptDialog::startReplaySession()
|
||||
|
||||
if (rp.id() != replayId)
|
||||
{
|
||||
ERROR_LOG() << "Script Player: replay ids do not match!!! cannot start app";
|
||||
ERROR_LOG(m_logger) << "Script Player: replay ids do not match!!! cannot start app";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
@@ -1068,7 +1068,7 @@ void ScriptDialog::startReplaySession()
|
||||
|
||||
if (m_replaySession == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "m_replaySession == nullptr";
|
||||
ERROR_LOG(m_logger) << "m_replaySession == nullptr";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
@@ -1092,11 +1092,11 @@ void ScriptDialog::startReplaySession()
|
||||
QString result(resultList.join(QStringLiteral("<br> - ")));
|
||||
|
||||
if (r && !result.isEmpty())
|
||||
WARNING_LOG() << "At least one optional widget & control interface failed to load: " << result;
|
||||
WARNING_LOG(m_logger) << "At least one optional widget & control interface failed to load: " << result;
|
||||
|
||||
if (!r)
|
||||
{
|
||||
ERROR_LOG() << "At least one widget & control interface failed to load: " << result;
|
||||
ERROR_LOG(m_logger) << "At least one widget & control interface failed to load: " << result;
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
@@ -1115,7 +1115,7 @@ void ScriptDialog::startReplaySession()
|
||||
m_requestHelper->deleteLater();
|
||||
m_requestHelper = nullptr;
|
||||
|
||||
ERROR_LOG() << "replayPartitionCreateRequest failed";
|
||||
ERROR_LOG(m_logger) << "replayPartitionCreateRequest failed";
|
||||
initFailed(__LINE__);
|
||||
};
|
||||
|
||||
@@ -1293,7 +1293,7 @@ void ScriptDialog::createSitMapApp()
|
||||
if (m_sitMapApp == nullptr)
|
||||
{
|
||||
LtsSessionData::LtsSessionData::getInstance()->setDebugFlagValue(QStringLiteral("DoNotCreateInstant.ReplayControl"), oldFlagValue);
|
||||
ERROR_LOG() << "createApp returned nullptr for m_sitMapApp";
|
||||
ERROR_LOG(m_logger) << "createApp returned nullptr for m_sitMapApp";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
@@ -1351,7 +1351,7 @@ void ScriptDialog::createSitMapApp()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "setting SitMapFilterIfc's SitMapPtr to this SitMapIfc failed, because the SitMapFilterIfc could not be found !!";
|
||||
ERROR_LOG(m_logger) << "setting SitMapFilterIfc's SitMapPtr to this SitMapIfc failed, because the SitMapFilterIfc could not be found !!";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
@@ -1366,14 +1366,14 @@ void ScriptDialog::createSitMapApp()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "setting ReplayControlIfc's SitMapPtr to this SitMapIfc failed, because the ReplayControlIfc could not be found !!";
|
||||
ERROR_LOG(m_logger) << "setting ReplayControlIfc's SitMapPtr to this SitMapIfc failed, because the ReplayControlIfc could not be found !!";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "setting SitMapFilterIfc's SitMapPtr to this SitMapIfc failed, because the SitMapIfc could not be found !!";
|
||||
ERROR_LOG(m_logger) << "setting SitMapFilterIfc's SitMapPtr to this SitMapIfc failed, because the SitMapIfc could not be found !!";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
@@ -1397,23 +1397,23 @@ void ScriptDialog::createSitMapApp()
|
||||
if (m_replaySession->getForeignGuiInterface<SituationMap::ScriptFilterForeignGuiInterface>(sitMapFilterGuiIfc))
|
||||
{
|
||||
sitMapFilterGuiIfc->setApplyFilter(applyFilter);
|
||||
DEBUG_LOG() << "set sit map filter ifc's apply filter";
|
||||
DEBUG_LOG(m_logger) << "set sit map filter ifc's apply filter";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "cannot set sit map filter ifc's apply filter - cannot find filter topic's ifc";
|
||||
WARNING_LOG(m_logger) << "cannot set sit map filter ifc's apply filter - cannot find filter topic's ifc";
|
||||
|
||||
|
||||
std::shared_ptr<SituationReplay::ForeignGuiInterface> sitRepIfc;
|
||||
if (m_replaySession->getForeignGuiInterface<SituationReplay::ForeignGuiInterface>(sitRepIfc))
|
||||
{
|
||||
sitRepIfc->setApplyFilter(applyFilter);
|
||||
DEBUG_LOG() << "set sit replay ifc's apply filter";
|
||||
DEBUG_LOG(m_logger) << "set sit replay ifc's apply filter";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "cannot set sit replay ifc's apply filter - cannot find filter topic's ifc";
|
||||
WARNING_LOG(m_logger) << "cannot set sit replay ifc's apply filter - cannot find filter topic's ifc";
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "cannot set sit map filter ifc's apply filter - cannot find map's flt ifc";
|
||||
WARNING_LOG(m_logger) << "cannot set sit map filter ifc's apply filter - cannot find map's flt ifc";
|
||||
}
|
||||
|
||||
|
||||
@@ -1429,14 +1429,14 @@ void ScriptDialog::createSitMapApp()
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "setting planOverlayIfc's SitMapPtr to this SitMapIfc failed, because the SitMapIfc could not be found !!";
|
||||
DEBUG_LOG(m_logger) << "setting planOverlayIfc's SitMapPtr to this SitMapIfc failed, because the SitMapIfc could not be found !!";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "setting planOverlayIfc's SitMapPtr to this SitMapIfc failed, because the SitMapFilterIfc could not be found !!";
|
||||
DEBUG_LOG(m_logger) << "setting planOverlayIfc's SitMapPtr to this SitMapIfc failed, because the SitMapFilterIfc could not be found !!";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
@@ -1451,14 +1451,14 @@ void ScriptDialog::createSitMapApp()
|
||||
thisMrkIfc->setScriptsMrkIfc(sitMapMrkIfc.get());
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "setting mrkIfc redirection failed - sitMap mrkIfc not found !";
|
||||
DEBUG_LOG(m_logger) << "setting mrkIfc redirection failed - sitMap mrkIfc not found !";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "setting mrkIfc redirection failed - this mrkIfc not found !";
|
||||
DEBUG_LOG(m_logger) << "setting mrkIfc redirection failed - this mrkIfc not found !";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
@@ -1471,7 +1471,7 @@ void ScriptDialog::createSitMapApp()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "could not start situation map app !!";
|
||||
ERROR_LOG(m_logger) << "could not start situation map app !!";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
@@ -1479,7 +1479,7 @@ void ScriptDialog::createSitMapApp()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Failed to start Situation App!";
|
||||
ERROR_LOG(m_logger) << "Failed to start Situation App!";
|
||||
initFailed(__LINE__);
|
||||
return;
|
||||
}
|
||||
@@ -1608,7 +1608,7 @@ bool ScriptDialog::apply()
|
||||
return false;
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Creating a copy of script " << m_scriptId;
|
||||
ERROR_LOG(m_logger) << "Creating a copy of script " << m_scriptId;
|
||||
m_scriptId = 0;
|
||||
name = tr("Copy of ")+ name;
|
||||
}
|
||||
@@ -1770,7 +1770,7 @@ int ScriptDialog::nextTopicTime() const
|
||||
auto nextTopicIter = topicMap.upperBound(m_positionTime);
|
||||
if (nextTopicIter == topicMap.constEnd())
|
||||
{
|
||||
DEBUG_LOG() << "There is no next topic!";
|
||||
DEBUG_LOG(m_logger) << "There is no next topic!";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1806,7 +1806,7 @@ void ScriptDialog::slotPlayUntilNextTopic()
|
||||
|
||||
if (topicTime < 0)
|
||||
{
|
||||
DEBUG_LOG() << "There is no next topic to play until!";
|
||||
DEBUG_LOG(m_logger) << "There is no next topic to play until!";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1818,7 +1818,7 @@ int ScriptDialog::previousTopicTime() const
|
||||
{
|
||||
if (m_topicMap.isEmpty())
|
||||
{
|
||||
DEBUG_LOG() << "There are no topics while checking for previous topic!";
|
||||
DEBUG_LOG(m_logger) << "There are no topics while checking for previous topic!";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1838,7 +1838,7 @@ int ScriptDialog::previousTopicTime() const
|
||||
|
||||
if (prevTopicIter == topicMap.constBegin())
|
||||
{
|
||||
DEBUG_LOG() << "There is no previous topic! (1)";
|
||||
DEBUG_LOG(m_logger) << "There is no previous topic! (1)";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1846,7 +1846,7 @@ int ScriptDialog::previousTopicTime() const
|
||||
|
||||
if (prevTopicIter == topicMap.constEnd())
|
||||
{
|
||||
DEBUG_LOG() << "There is no previous topic! (2)";
|
||||
DEBUG_LOG(m_logger) << "There is no previous topic! (2)";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1898,7 +1898,7 @@ Screen *ScriptDialog::getProjectionWidget(const ScriptDialog::ProjectionWidget &
|
||||
|
||||
ScriptDialog::ProjectionWidget ScriptDialog::identifyProjectionWidget(TrackEntry *topic) const
|
||||
{
|
||||
DEBUG_LOG() << "identifyProjectionWidget: channel name: " << topic->m_channelName << ", filter parent channel name: " << topic->m_filterParentChannel;
|
||||
DEBUG_LOG(m_logger) << "identifyProjectionWidget: channel name: " << topic->m_channelName << ", filter parent channel name: " << topic->m_filterParentChannel;
|
||||
|
||||
if (topic->m_channelName == QStringLiteral("Screen 2"))
|
||||
return ProjectionWidget::Screen2;
|
||||
@@ -1937,7 +1937,7 @@ bool ScriptDialog::_tryAddTopic(TrackEntryType trackEntryType,
|
||||
{
|
||||
if (!ta.m_topicEditorIfc->initTopicEditor())
|
||||
{
|
||||
ERROR_LOG() << "Cannot add topic type " << typeName << " since 'initTopicEditor' failed";
|
||||
ERROR_LOG(m_logger) << "Cannot add topic type " << typeName << " since 'initTopicEditor' failed";
|
||||
resultList.append(typeName);
|
||||
return false;
|
||||
}
|
||||
@@ -2017,14 +2017,14 @@ void ScriptDialog::setReplayWidgetPosition(PlayingTopic *playingTopic)
|
||||
|
||||
if (projectionWidget == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "screen for topic #" << playingTopic->topic->m_topicId << " not found";
|
||||
ERROR_LOG(m_logger) << "screen for topic #" << playingTopic->topic->m_topicId << " not found";
|
||||
return;
|
||||
}
|
||||
|
||||
int projectionWidth = projectionWidget->width();
|
||||
int projectionHeight = projectionWidget->height();
|
||||
|
||||
DEBUG_LOG() << "projection w: " << projectionWidth << ", h: " << projectionHeight;
|
||||
DEBUG_LOG(m_logger) << "projection w: " << projectionWidth << ", h: " << projectionHeight;
|
||||
|
||||
TrackEntry *topic = playingTopic->topic;
|
||||
|
||||
@@ -2048,7 +2048,7 @@ void ScriptDialog::setReplayWidgetPosition(PlayingTopic *playingTopic)
|
||||
|
||||
if (replayWidget == nullptr)
|
||||
{
|
||||
WARNING_LOG() << "no replay widget for topic" << topic->m_topicId;
|
||||
WARNING_LOG(m_logger) << "no replay widget for topic" << topic->m_topicId;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2057,7 +2057,7 @@ void ScriptDialog::setReplayWidgetPosition(PlayingTopic *playingTopic)
|
||||
|| (topic->x < 0 || topic->w < 0 || topic->y < 0 || topic->h < 0))
|
||||
{
|
||||
replayWidget->setGeometry(x, y, projectionWidth, projectionHeight);
|
||||
ERROR_LOG() << "set geo of replay widget !! #1 x" << x << "y" << y;
|
||||
ERROR_LOG(m_logger) << "set geo of replay widget !! #1 x" << x << "y" << y;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2069,7 +2069,7 @@ void ScriptDialog::setReplayWidgetPosition(PlayingTopic *playingTopic)
|
||||
replayWidget->setGeometry(x + qRound(projectionX), y + qRound(projectionY), qRound(projectionW), qRound(projectionH));
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "final widget geo: " << replayWidget->geometry().x()
|
||||
DEBUG_LOG(m_logger) << "final widget geo: " << replayWidget->geometry().x()
|
||||
<< ", " << replayWidget->geometry().y()
|
||||
<< ", " << replayWidget->geometry().width()
|
||||
<< ", " << replayWidget->geometry().height();
|
||||
@@ -2089,7 +2089,7 @@ void ScriptDialog::setReplayWidgetFreestanding(PlayingTopic *playingTopic, bool
|
||||
|
||||
if (projectionWidget == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "screen for topic #" << playingTopic->topic->m_topicId << " not found";
|
||||
ERROR_LOG(m_logger) << "screen for topic #" << playingTopic->topic->m_topicId << " not found";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2145,7 +2145,7 @@ void ScriptDialog::avsVisibilityHack(QWidget *parentForScreen, bool visible)
|
||||
QPoint pos(m_currentTopicDesigner->parentWidget()->mapToGlobal(geo.topLeft()));
|
||||
|
||||
widget->setGeometry(QRect(pos, s));
|
||||
ERROR_LOG() << "geo x" << widget->geometry().x() << "geo y" << widget->geometry().y() << "geo h" << widget->geometry().height() << "geo w" << widget->geometry().width();
|
||||
ERROR_LOG(m_logger) << "geo x" << widget->geometry().x() << "geo y" << widget->geometry().y() << "geo h" << widget->geometry().height() << "geo w" << widget->geometry().width();
|
||||
|
||||
|
||||
widget->setWindowFlags(Qt::FramelessWindowHint);
|
||||
@@ -2174,7 +2174,7 @@ void ScriptDialog::avsVisibilityHack(QWidget *parentForScreen, bool visible)
|
||||
m_currentTopicDesigner->setParent(widget);
|
||||
m_currentTopicDesigner->show();
|
||||
|
||||
ERROR_LOG() << "made freestanding";
|
||||
ERROR_LOG(m_logger) << "made freestanding";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2219,7 +2219,7 @@ void ScriptDialog::setFreestanding(bool freestanding, const ProjectionWidget &pw
|
||||
|
||||
case ProjectionWidget::Unknown:
|
||||
{
|
||||
ERROR_LOG() << "trying to set freestanding with unknown projection widget - cannot set freestanding";
|
||||
ERROR_LOG(m_logger) << "trying to set freestanding with unknown projection widget - cannot set freestanding";
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2243,7 +2243,7 @@ bool ScriptDialog::isScreenFreestanding(const ProjectionWidget &pw) const
|
||||
case ProjectionWidget::Screen2:
|
||||
return m_currentlyFreestandingTopicsScreen2;
|
||||
case ProjectionWidget::Unknown:
|
||||
ERROR_LOG() << "projection widget unknown";
|
||||
ERROR_LOG(m_logger) << "projection widget unknown";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -2286,7 +2286,7 @@ void ScriptDialog::addReplayWidget(PlayingTopic *playingTopic, QWidget *replayWi
|
||||
|
||||
case ProjectionWidget::Unknown:
|
||||
{
|
||||
ERROR_LOG() << "projection widget unknown - cannot add replay widget";
|
||||
ERROR_LOG(m_logger) << "projection widget unknown - cannot add replay widget";
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2305,7 +2305,7 @@ bool ScriptDialog::enableFireEventFlash(bool enable)
|
||||
if (m_sitMapSession->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(sitMapIfc))
|
||||
success = sitMapIfc->enableFireEventFlashing(enable);
|
||||
else
|
||||
WARNING_LOG() << Q_FUNC_INFO << " Cannot execute enableFireEventFlashing with enable=" << enable;
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " Cannot execute enableFireEventFlashing with enable=" << enable;
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -2338,11 +2338,11 @@ void ScriptDialog::playTopic(TrackEntry *topic)
|
||||
|
||||
for (const TopicAssignment &ta : std::as_const(m_trackEntryAssignments))
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " ta.m_topicName = " << ta.m_topicName;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ta.m_topicName = " << ta.m_topicName;
|
||||
|
||||
if (topic->m_type == ta.m_trackEntryType)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " createInterface";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " createInterface";
|
||||
|
||||
playingTopic->topicTypeName = ta.m_topicName;
|
||||
playingTopic->trackEntryType = ta.m_trackEntryType;
|
||||
@@ -2352,17 +2352,17 @@ void ScriptDialog::playTopic(TrackEntry *topic)
|
||||
|
||||
if (playingTopic->topicTypeName.isEmpty() || playingTopic->topicReplayIfc == nullptr)
|
||||
{
|
||||
WARNING_LOG() << "Topic could not be assigned!! type name: " << playingTopic->topicTypeName << "replay ifc: " << (void *)playingTopic->topicReplayIfc;
|
||||
WARNING_LOG(m_logger) << "Topic could not be assigned!! type name: " << playingTopic->topicTypeName << "replay ifc: " << (void *)playingTopic->topicReplayIfc;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " playingTopic->trackEntryType " << playingTopic->trackEntryType;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " playingTopic->trackEntryType " << playingTopic->trackEntryType;
|
||||
|
||||
if (playingTopic->trackEntryType == TrackEntryType::SituationMap ||
|
||||
playingTopic->trackEntryType == TrackEntryType::Situation)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " addReplayWidget";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " addReplayWidget";
|
||||
|
||||
m_sitMapSession->baseLayout()->setAutoFillBackground(true);
|
||||
addReplayWidget(playingTopic, m_sitMapSession->baseLayout());
|
||||
@@ -2370,33 +2370,33 @@ void ScriptDialog::playTopic(TrackEntry *topic)
|
||||
if (sitMapIfc || m_sitMapSession->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(sitMapIfc))
|
||||
sitMapIfc->forceUpdate();
|
||||
else
|
||||
WARNING_LOG() << "Cannot force update on Situation Map - map might be stuck!";
|
||||
WARNING_LOG(m_logger) << "Cannot force update on Situation Map - map might be stuck!";
|
||||
|
||||
if (playingTopic->trackEntryType == TrackEntryType::Situation)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " Situation -> ENable FireEventFlashing";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " Situation -> ENable FireEventFlashing";
|
||||
if (!enableFireEventFlash(true))
|
||||
WARNING_LOG() << Q_FUNC_INFO << " Cannot enableFireEventFlashing at Situation Map";
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " Cannot enableFireEventFlashing at Situation Map";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " non-sitmap";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " non-sitmap";
|
||||
|
||||
|
||||
|
||||
|
||||
if (playingTopic->trackEntryType == TrackEntryType::Snapshot)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " Snapshot -> DISable FireEventFlashing";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " Snapshot -> DISable FireEventFlashing";
|
||||
if (!enableFireEventFlash(false))
|
||||
WARNING_LOG() << Q_FUNC_INFO << " Cannot disableFireEventFlashing at Situation Map";
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " Cannot disableFireEventFlashing at Situation Map";
|
||||
}
|
||||
else if (playingTopic->trackEntryType == TrackEntryType::SituationReplay)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " SituationReplay -> ENable FireEventFlashing";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " SituationReplay -> ENable FireEventFlashing";
|
||||
if (!enableFireEventFlash(true))
|
||||
WARNING_LOG() << Q_FUNC_INFO << " Cannot enableFireEventFlashing at Situation Map";
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " Cannot enableFireEventFlashing at Situation Map";
|
||||
}
|
||||
|
||||
|
||||
@@ -2424,14 +2424,14 @@ void ScriptDialog::playTopic(TrackEntry *topic)
|
||||
}
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "topic #" << playingTopic->topic->m_topicId << " has no widget to show on presentation screen";
|
||||
WARNING_LOG(m_logger) << "topic #" << playingTopic->topic->m_topicId << " has no widget to show on presentation screen";
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (topic->m_detailData.isEmpty())
|
||||
{
|
||||
WARNING_LOG() << "Note: Topic id " << topic->m_topicId << " has no JSON data";
|
||||
WARNING_LOG(m_logger) << "Note: Topic id " << topic->m_topicId << " has no JSON data";
|
||||
|
||||
|
||||
}
|
||||
@@ -2447,7 +2447,7 @@ void ScriptDialog::playTopic(TrackEntry *topic)
|
||||
|
||||
if (!playingTopic->topicReplayIfc->playbackInit(obj))
|
||||
{
|
||||
WARNING_LOG() << "Playing topic # " << topic->m_topicId << " playback init failed! Playback of this topic failed!";
|
||||
WARNING_LOG(m_logger) << "Playing topic # " << topic->m_topicId << " playback init failed! Playback of this topic failed!";
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -2465,9 +2465,9 @@ void ScriptDialog::playTopic(TrackEntry *topic)
|
||||
});
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "playbackStart at offset" << m_positionTime - topic->m_startTime;
|
||||
DEBUG_LOG(m_logger) << "playbackStart at offset" << m_positionTime - topic->m_startTime;
|
||||
if (!playingTopic->topicReplayIfc->playbackStart(m_positionTime - topic->m_startTime ))
|
||||
WARNING_LOG() << "Playing topic # " << topic->m_topicId << " playback start failed! Playback of this topic failed!";
|
||||
WARNING_LOG(m_logger) << "Playing topic # " << topic->m_topicId << " playback start failed! Playback of this topic failed!";
|
||||
|
||||
m_journal.journalList.append(new NextTopicJournal(m_positionTime, playingTopic->isFilter, playingTopic->topicTypeName, topic->m_length));
|
||||
}
|
||||
@@ -2559,7 +2559,7 @@ void ScriptDialog::slotTimerTick()
|
||||
if (m_positionTime >= topic->m_startTime && m_positionTime < (topic->m_startTime + topic->m_length))
|
||||
{
|
||||
|
||||
DEBUG_LOG() << "Playing topic id " << topic->m_topicId << " with description " << topic->m_description;
|
||||
DEBUG_LOG(m_logger) << "Playing topic id " << topic->m_topicId << " with description " << topic->m_description;
|
||||
playTopic(topic);
|
||||
}
|
||||
}
|
||||
@@ -2591,7 +2591,7 @@ void ScriptDialog::slotTimerTick()
|
||||
int realFilterTime = filterTe->m_startTime;
|
||||
if (m_positionTime >= (realFilterTime + 1) && m_positionTime <= (realFilterTime + filterTe->m_length))
|
||||
{
|
||||
DEBUG_LOG() << "Playing filter topic id " << filterTe->m_topicId << " with description " << filterTe->m_description;
|
||||
DEBUG_LOG(m_logger) << "Playing filter topic id " << filterTe->m_topicId << " with description " << filterTe->m_description;
|
||||
|
||||
|
||||
playTopic(filterTe);
|
||||
@@ -2720,10 +2720,10 @@ void ScriptDialog::slotPlay()
|
||||
{
|
||||
if (playingTopic->topicReplayIfc != nullptr && m_ignoreTopicForReplay != playingTopic->topic->m_topicId)
|
||||
{
|
||||
DEBUG_LOG() << "playbackStart (resume) at offset" << m_positionTime - playingTopic->topic->m_startTime;
|
||||
DEBUG_LOG(m_logger) << "playbackStart (resume) at offset" << m_positionTime - playingTopic->topic->m_startTime;
|
||||
if (!playingTopic->topicReplayIfc->playbackStart(m_positionTime - playingTopic->topic->m_startTime
|
||||
))
|
||||
WARNING_LOG() << "Playing topic # " << playingTopic->topic->m_topicId << " playback start failed! Re-playback of this topic failed!";
|
||||
WARNING_LOG(m_logger) << "Playing topic # " << playingTopic->topic->m_topicId << " playback start failed! Re-playback of this topic failed!";
|
||||
}
|
||||
|
||||
|
||||
@@ -2731,15 +2731,15 @@ void ScriptDialog::slotPlay()
|
||||
|
||||
if (playingTopic->trackEntryType == TrackEntryType::Snapshot)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " Snapshot -> DISable FireEventFlashing";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " Snapshot -> DISable FireEventFlashing";
|
||||
if (!enableFireEventFlash(false))
|
||||
WARNING_LOG() << Q_FUNC_INFO << " Cannot disableFireEventFlashing at Situation Map";
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " Cannot disableFireEventFlashing at Situation Map";
|
||||
}
|
||||
else if (playingTopic->trackEntryType == TrackEntryType::SituationReplay)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " Snapshot -> ENable FireEventFlashing";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " Snapshot -> ENable FireEventFlashing";
|
||||
if (!enableFireEventFlash(true))
|
||||
WARNING_LOG() << Q_FUNC_INFO << " Cannot enableFireEventFlashing at Situation Map";
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " Cannot enableFireEventFlashing at Situation Map";
|
||||
}
|
||||
|
||||
|
||||
@@ -2792,7 +2792,7 @@ void ScriptDialog::slotPause()
|
||||
if (m_sitMapSession->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(sitMapIfc))
|
||||
sitMapIfc->enableFireEventFlashing(false);
|
||||
else
|
||||
WARNING_LOG() << "Cannot update sit map fire event flashing";
|
||||
WARNING_LOG(m_logger) << "Cannot update sit map fire event flashing";
|
||||
}
|
||||
|
||||
|
||||
@@ -2847,7 +2847,7 @@ void ScriptDialog::stop(bool ended, bool ignoreFireEventFlashing)
|
||||
if (m_sitMapSession->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(sitMapIfc))
|
||||
sitMapIfc->enableFireEventFlashing(true);
|
||||
else
|
||||
WARNING_LOG() << "Cannot update sit map fire event flashing";
|
||||
WARNING_LOG(m_logger) << "Cannot update sit map fire event flashing";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2866,7 +2866,7 @@ void ScriptDialog::pausePlayingTopics()
|
||||
{
|
||||
if (playingTopic->topicReplayIfc != nullptr)
|
||||
{
|
||||
DEBUG_LOG() << "Pause topic: " << playingTopic->topicTypeName;
|
||||
DEBUG_LOG(m_logger) << "Pause topic: " << playingTopic->topicTypeName;
|
||||
playingTopic->topicReplayIfc->playbackPause();
|
||||
|
||||
QString status = tr("Currently paused topic '%1' %2")
|
||||
@@ -2875,7 +2875,7 @@ void ScriptDialog::pausePlayingTopics()
|
||||
m_ui->lwStatus->addItem(status);
|
||||
}
|
||||
else
|
||||
DEBUG_LOG() << "Topic not paused: " << playingTopic->topicTypeName;
|
||||
DEBUG_LOG(m_logger) << "Topic not paused: " << playingTopic->topicTypeName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2934,7 +2934,7 @@ void ScriptDialog::initProjectionWidget(Screen **pointerToWidgetPointer)
|
||||
{
|
||||
if (static_cast<QObject *>(*pointerToWidgetPointer) == sender())
|
||||
*pointerToWidgetPointer = nullptr;
|
||||
INFO_LOG() << "a projection windows was destroyed";
|
||||
INFO_LOG(m_logger) << "a projection windows was destroyed";
|
||||
});
|
||||
|
||||
*pointerToWidgetPointer = projWindow;
|
||||
@@ -2951,7 +2951,7 @@ void ScriptDialog::fillTopicVector()
|
||||
|
||||
for (const LtsScriptTimeline::TrackEntry *trackEntry : std::as_const(m_topicVector))
|
||||
{
|
||||
DEBUG_LOG() << "m_topicVector index=" << trackEntry->index
|
||||
DEBUG_LOG(m_logger) << "m_topicVector index=" << trackEntry->index
|
||||
<< " topicId=" << trackEntry->m_topicId
|
||||
<< " type=" << trackEntry->m_type;
|
||||
|
||||
@@ -2975,7 +2975,7 @@ void ScriptDialog::fillTopicVector()
|
||||
for (const FilterTopic &filterTopic : std::as_const(m_filterTopicVector))
|
||||
{
|
||||
const LtsScriptTimeline::TrackEntry *trackEntry = filterTopic.filterTopic;
|
||||
DEBUG_LOG() << "m_filterTopicVector mainTopicId=" << filterTopic.mainTopicId
|
||||
DEBUG_LOG(m_logger) << "m_filterTopicVector mainTopicId=" << filterTopic.mainTopicId
|
||||
<< " index=" << trackEntry->index
|
||||
<< " topicId=" << trackEntry->m_topicId
|
||||
<< " type=" << trackEntry->m_type
|
||||
@@ -3091,7 +3091,7 @@ void ScriptDialog::exportPresentationContent(const Core::FunctionReply &baseRepl
|
||||
|
||||
if (contentList.size() < 1)
|
||||
{
|
||||
ERROR_LOG() << "No Presentation Content for Script Id " << reply.id();
|
||||
ERROR_LOG(m_logger) << "No Presentation Content for Script Id " << reply.id();
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("No presentation content, nothing to export!"));
|
||||
return;
|
||||
}
|
||||
@@ -3106,7 +3106,7 @@ void ScriptDialog::exportPresentationContent(const Core::FunctionReply &baseRepl
|
||||
|
||||
if (!topicStringToType(QString::fromStdString(content.presentationTopicType()), tet) || tet == TrackEntryType::INVALID)
|
||||
{
|
||||
ERROR_LOG() << "Topic ignored at export - invalid topic type for presentation's content id " << content.id();
|
||||
ERROR_LOG(m_logger) << "Topic ignored at export - invalid topic type for presentation's content id " << content.id();
|
||||
continue;
|
||||
}
|
||||
#ifndef EXPORT_BDV_TOPIC_AS_JSON
|
||||
@@ -3132,7 +3132,7 @@ void ScriptDialog::exportPresentationContent(const Core::FunctionReply &baseRepl
|
||||
eVSession()->baseLayout()->focusTab(pBaseGuiIfc->menuGroup(), QStringLiteral("bdvShowBdv"), LtsWidgets::LayoutArea::eMainTab);
|
||||
}
|
||||
else
|
||||
ERROR_LOG() << "Fetching ForeignGuiInterface of BuildingViewer failed!";
|
||||
ERROR_LOG(m_logger) << "Fetching ForeignGuiInterface of BuildingViewer failed!";
|
||||
}
|
||||
|
||||
|
||||
@@ -3244,7 +3244,7 @@ void ScriptDialog::slotLoadScript()
|
||||
std::shared_ptr<OperatorManagement::Interface::Dtc> opmDtc;
|
||||
if (!m_exerciseSession->getDtc<OperatorManagement::DataInterface>(opmDtc))
|
||||
{
|
||||
ERROR_LOG() << "opm dtc missing for script chooser ...";
|
||||
ERROR_LOG(m_logger) << "opm dtc missing for script chooser ...";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3297,7 +3297,7 @@ void ScriptDialog::slotExportScript()
|
||||
return;
|
||||
|
||||
QString exportPath = TakeHomePackageGenerator::ExportProcess::exportPath(m_exerciseSession->exerciseId()) + QString::number(m_scriptId);
|
||||
DEBUG_LOG() << "exportPath: " << exportPath;
|
||||
DEBUG_LOG(m_logger) << "exportPath: " << exportPath;
|
||||
|
||||
QDir dir(exportPath);
|
||||
if (!dir.exists())
|
||||
@@ -3315,7 +3315,7 @@ void ScriptDialog::slotExportScript()
|
||||
|
||||
if (dir.exists() && !dir.isEmpty())
|
||||
{
|
||||
INFO_LOG() << "slotExportScript: dir.exists() && !dir.isEmpty()" ;
|
||||
INFO_LOG(m_logger) << "slotExportScript: dir.exists() && !dir.isEmpty()" ;
|
||||
LtsWidgets::Button button = LtsWidgets::LtsMessageDialog::showMessage(this,
|
||||
tr("Specified folder already exists and is not empty. Do you want to overwrite this folder?"),
|
||||
tr("Information: %1").arg(dir.absolutePath()),
|
||||
|
||||
+2
-2
@@ -226,7 +226,7 @@ private:
|
||||
|
||||
if (!m_exerciseSession->interfaceFromGui<TopicEditorInterface>(topicEditorIfc))
|
||||
{
|
||||
ERROR_LOG() << "getTopicEditorIfc failed: Cannot add topic type "
|
||||
ERROR_LOG(m_logger) << "getTopicEditorIfc failed: Cannot add topic type "
|
||||
<< LtsScriptTimeline::trackEntryTypeName(trackEntryType)
|
||||
<< " because topic editor ifc is missing.";
|
||||
return nullptr;
|
||||
@@ -243,7 +243,7 @@ private:
|
||||
|
||||
if (!m_replaySession->interfaceFromGui<TopicReplayInterface>(topicReplayFactory))
|
||||
{
|
||||
ERROR_LOG() << "getTopicIfcFactory failed: Cannot add topic type "
|
||||
ERROR_LOG(m_logger) << "getTopicIfcFactory failed: Cannot add topic type "
|
||||
<< LtsScriptTimeline::trackEntryTypeName(trackEntryType)
|
||||
<< " because topic ifc factory is missing.";
|
||||
return nullptr;
|
||||
|
||||
+2
@@ -27,6 +27,8 @@ public:
|
||||
void retranslate() override final;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void fillJournal();
|
||||
|
||||
private slots:
|
||||
|
||||
+8
-8
@@ -17,7 +17,7 @@ ScreenRecorder::ScreenRecorder(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger(QStringLiteral("ScreenRecorder")))
|
||||
{
|
||||
connect(this, &ScreenRecorder::newTime, this, [this](qint64 _t1){ DEBUG_LOG() << "newTime: " << _t1; });
|
||||
connect(this, &ScreenRecorder::newTime, this, [this](qint64 _t1){ DEBUG_LOG(m_logger) << "newTime: " << _t1; });
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ void ScreenRecorder::cut()
|
||||
}
|
||||
catch (const QString &msg)
|
||||
{
|
||||
ERROR_LOG() << "Cutting recording of topic '" << tr->topicName() << "', id: " << tr->topicId() << " failed! " << msg;
|
||||
ERROR_LOG(m_logger) << "Cutting recording of topic '" << tr->topicName() << "', id: " << tr->topicId() << " failed! " << msg;
|
||||
m_failedExportTopicIds += tr->topicId();
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ void ScreenRecorder::save(const QString &tmpDirPath)
|
||||
}
|
||||
catch (const QString &msg)
|
||||
{
|
||||
ERROR_LOG() << "Saving recording of topic '" << tr->topicName() << "', id: " << tr->topicId() << " failed! " << msg;
|
||||
ERROR_LOG(m_logger) << "Saving recording of topic '" << tr->topicName() << "', id: " << tr->topicId() << " failed! " << msg;
|
||||
m_failedExportTopicIds += tr->topicId();
|
||||
}
|
||||
}
|
||||
@@ -81,14 +81,14 @@ void ScreenRecorder::addTopicsForScreen(Screen *screen, const std::vector<TopicI
|
||||
connect(topicRecorder, &TopicRecorder::exportFailed, this, [this, id]() { emit topicExportFailed(id); });
|
||||
connect(topicRecorder, &TopicRecorder::exportFailed, this, [this, name, id]()
|
||||
{
|
||||
ERROR_LOG() << "Export failed for topic '" << name << "', id: " << id;
|
||||
ERROR_LOG(m_logger) << "Export failed for topic '" << name << "', id: " << id;
|
||||
m_failedExportTopicIds += id;
|
||||
});
|
||||
|
||||
m_topicRecorder.append(topicRecorder);
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Added " << topicItems.size() << " TopicRecorder.";
|
||||
DEBUG_LOG(m_logger) << "Added " << topicItems.size() << " TopicRecorder.";
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ void ScreenRecorder::setCurrentTime(qint64 currentTime)
|
||||
|
||||
void ScreenRecorder::clear()
|
||||
{
|
||||
DEBUG_LOG() << "Clearing TopicRecorder.";
|
||||
DEBUG_LOG(m_logger) << "Clearing TopicRecorder.";
|
||||
|
||||
for (TopicRecorder *currentTopicRecorder : std::as_const(m_topicRecorder))
|
||||
{
|
||||
@@ -130,12 +130,12 @@ void ScreenRecorder::clear()
|
||||
|
||||
void ScreenRecorder::waitForFinishedRecording()
|
||||
{
|
||||
DEBUG_LOG() << "Waiting for TopicRecorder to finish ...";
|
||||
DEBUG_LOG(m_logger) << "Waiting for TopicRecorder to finish ...";
|
||||
|
||||
for (TopicRecorder *currentTopicRecorder : std::as_const(m_topicRecorder))
|
||||
currentTopicRecorder->waitForFinishedRecording();
|
||||
|
||||
DEBUG_LOG() << "... all TopicRecorder finished.";
|
||||
DEBUG_LOG(m_logger) << "... all TopicRecorder finished.";
|
||||
}
|
||||
|
||||
}
|
||||
+2
@@ -49,6 +49,8 @@ signals:
|
||||
void cancel();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVector<TopicRecorder *> m_topicRecorder;
|
||||
QSet<int> m_failedExportTopicIds;
|
||||
};
|
||||
|
||||
+4
-4
@@ -33,7 +33,7 @@ void ScreenShotter::addTopicsForScreen(Screen *screen, const std::vector<TopicIt
|
||||
const double topicY = currentTopicItem.topicData().y;
|
||||
const double topicW = currentTopicItem.topicData().w;
|
||||
const double topicH = currentTopicItem.topicData().h;
|
||||
ERROR_LOG() << "ScreenShotter::addTopicsForScreen: x: " << topicX << ", y: " << topicY << ", w: " << topicW << ", h: " << topicH;
|
||||
ERROR_LOG(m_logger) << "ScreenShotter::addTopicsForScreen: x: " << topicX << ", y: " << topicY << ", w: " << topicW << ", h: " << topicH;
|
||||
TopicShotter *topicShotter = new TopicShotter(id, name, screen, 0, startTime, stopTime, topicX, topicY,
|
||||
topicW, topicH, (!currentTopicItem.parentChannel().isEmpty()),
|
||||
currentTopicItem.description(), this);
|
||||
@@ -42,14 +42,14 @@ void ScreenShotter::addTopicsForScreen(Screen *screen, const std::vector<TopicIt
|
||||
connect(topicShotter, &TopicShotter::exportFailed, this, [this, id]() { emit topicExportFailed(id); });
|
||||
connect(topicShotter, &TopicShotter::exportFailed, this, [this, name, id]()
|
||||
{
|
||||
ERROR_LOG() << "Export failed for topic '" << name << "', id: " << id;
|
||||
ERROR_LOG(m_logger) << "Export failed for topic '" << name << "', id: " << id;
|
||||
m_failedExportTopicIds += id;
|
||||
});
|
||||
|
||||
m_topicShotter.append(topicShotter);
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Added " << topicItems.size() << " TopicShotter.";
|
||||
DEBUG_LOG(m_logger) << "Added " << topicItems.size() << " TopicShotter.";
|
||||
}
|
||||
|
||||
void ScreenShotter::saveRecordings(const QString &tmpDirPath)
|
||||
@@ -65,7 +65,7 @@ void ScreenShotter::saveRecordings(const QString &tmpDirPath)
|
||||
}
|
||||
catch (const QString &msg)
|
||||
{
|
||||
ERROR_LOG() << "Saving screenshot of topic '" << tr->topicName() << "', id: " << tr->topicId() << " failed! " << msg;
|
||||
ERROR_LOG(m_logger) << "Saving screenshot of topic '" << tr->topicName() << "', id: " << tr->topicId() << " failed! " << msg;
|
||||
m_failedExportTopicIds += tr->topicId();
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -36,6 +36,8 @@ signals:
|
||||
void topicExportFailed(const int failedTopicId);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVector<TopicShotter *> m_topicShotter;
|
||||
QSet<int> m_failedExportTopicIds;
|
||||
};
|
||||
|
||||
+180
-180
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -218,7 +218,7 @@ private:
|
||||
|
||||
if (!m_exerciseSession->interfaceFromGui<TopicEditorInterface>(topicEditorIfc))
|
||||
{
|
||||
ERROR_LOG() << "getTopicEditorIfc failed: Cannot add topic type "
|
||||
ERROR_LOG(m_logger) << "getTopicEditorIfc failed: Cannot add topic type "
|
||||
<< TopicEditorBase::topicTypeString(topicType)
|
||||
<< " because topic editor ifc is missing.";
|
||||
return nullptr;
|
||||
@@ -234,7 +234,7 @@ private:
|
||||
|
||||
if (!m_replaySession->interfaceFromGui<TopicReplayInterface>(topicReplayFactory))
|
||||
{
|
||||
ERROR_LOG() << "getTopicIfcFactory failed: Cannot add topic type "
|
||||
ERROR_LOG(m_logger) << "getTopicIfcFactory failed: Cannot add topic type "
|
||||
<< TopicEditorBase::topicTypeString(topicType)
|
||||
<< " because topic ifc factory is missing.";
|
||||
return nullptr;
|
||||
|
||||
+44
-44
@@ -164,8 +164,8 @@ int ScriptModel::addItem(const QString &trackName, TopicItem &&_topicItem, qint6
|
||||
return lambda(m_screen2TrackId, std::move(_topicItem));
|
||||
}
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed for item with trackName = " << trackName << " failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed for item with trackName = " << trackName << " failed"; }
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -216,8 +216,8 @@ std::vector<TopicItem> ScriptModel::topicItems() const
|
||||
for (const ItemPtr &_itemPtr: _trackPtr->items())
|
||||
ret.push_back(static_cast<const TopicItem &>(*_itemPtr.get()).copy());
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed"; }
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -243,11 +243,11 @@ std::vector<TopicItem> ScriptModel::topicItemsByTrackId(int trackId) const
|
||||
}
|
||||
catch (const QString &errMsg)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " " << errMsg;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " " << errMsg;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed";
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -279,8 +279,8 @@ QVector<int> ScriptModel::mainTopicItemIds() const
|
||||
for (const ItemPtr &_itemPtr: _screen2Track.items())
|
||||
ret.append(_itemPtr->id());
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed"; }
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -344,8 +344,8 @@ QVector<int> ScriptModel::filterTopicItemIds() const
|
||||
for (const ItemPtr &_itemPtr: _trackPtr->items())
|
||||
ret.append(_itemPtr->id());
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed"; }
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -363,8 +363,8 @@ QVector<int> ScriptModel::filterTopicItemIds(int _topicItemId) const
|
||||
if (_trackPtr->isItemsBetween(_topicItem.startTime(), end, {}))
|
||||
ret += _trackPtr->itemIdsBetween(_topicItem.startTime(), end, false, true);
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed"; }
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -402,8 +402,8 @@ qint64 ScriptModel::firstTopicStart() const
|
||||
firstStart = std::min(firstStart, time);
|
||||
}
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed"; }
|
||||
return firstStart == LLONG_MAX ? -1 : firstStart;
|
||||
}
|
||||
|
||||
@@ -428,8 +428,8 @@ qint64 ScriptModel::lastTopicEnd() const
|
||||
if (time != -1)
|
||||
lastEnd = std::max(lastEnd, time);
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed"; }
|
||||
return lastEnd;
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ bool ScriptModel::isMainTrack(int _trackId) const
|
||||
{
|
||||
return track(_trackId).parentId() == m_rootTrack.id();
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) {}
|
||||
return false;
|
||||
}
|
||||
@@ -476,7 +476,7 @@ bool ScriptModel::isFilterTrack(int _trackId) const
|
||||
{
|
||||
return track(_trackId).parentId() != m_rootTrack.id();
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) {}
|
||||
return false;
|
||||
}
|
||||
@@ -676,12 +676,12 @@ bool ScriptModel::import(const QVector<PresentationContent> &contents) noexcept(
|
||||
}
|
||||
catch (const QString &errMsg)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " failed: " << errMsg;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed: " << errMsg;
|
||||
return false;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -706,12 +706,12 @@ bool ScriptModel::import(const QVector<PresentationContent> &contents) noexcept(
|
||||
}
|
||||
catch (const QString &errMsg)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " failed: " << errMsg;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed: " << errMsg;
|
||||
return false;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -763,8 +763,8 @@ void ScriptModel::insertTopicItem(int _trackId, TopicItem &&__topicItem)
|
||||
if (isFilterTrack(_topicTrack.id()))
|
||||
_topicItem.setParentChannel(static_cast<const TopicTrack &>(track(_topicTrack.parentId())).internalName());
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed"; }
|
||||
}
|
||||
|
||||
|
||||
@@ -926,8 +926,8 @@ bool ScriptModel::canDropItem(const Item &_item, int _trackId, qint64 start) con
|
||||
|
||||
return !isTopicItemBlocked(_topicItem, static_cast<const TopicTrack &>(track(_trackId)), start, _topicItem.duration());
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed"; }
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -980,8 +980,8 @@ bool ScriptModel::canMoveItem(const Item &_item, qint64 start) const
|
||||
static_cast<const TopicItem &>(_item), static_cast<const TopicTrack &>(track(_item.parentTrackId())), start, _item.duration()
|
||||
);
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed for item with id = " << _item.id(); }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed for item with id = " << _item.id(); }
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1050,8 +1050,8 @@ bool ScriptModel::canResizeItem(const Item &_item, qint64 start, int duration) c
|
||||
static_cast<const TopicItem &>(_item), static_cast<const TopicTrack &>(track(_item.parentTrackId())), start, duration
|
||||
);
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed for item with id = " << _item.id(); }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed for item with id = " << _item.id(); }
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1068,7 +1068,7 @@ void ScriptModel::copyToClipboard(const QVector<int> &_itemIds) noexcept(false)
|
||||
_topicItemPtr->m_parentTrackId = _topicItem.m_parentTrackId;
|
||||
minTime = std::min(minTime, _topicItem.startTime());
|
||||
m_clipboard.push_back(std::move(_topicItemPtr));
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " copied item with id = " << _topicItem.id() << " to clipboard";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " copied item with id = " << _topicItem.id() << " to clipboard";
|
||||
};
|
||||
|
||||
for (int _topicItemId : _itemIds)
|
||||
@@ -1181,8 +1181,8 @@ void ScriptModel::pasteFromClipboard(qint64 time) noexcept(false)
|
||||
_topicItem.setTopicId(_itemId);
|
||||
_topicItem.topicData().startTime = _topicItem.startTime() / 1000LL;
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << "adding item failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << "adding item failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << "adding item failed: " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << "adding item failed"; }
|
||||
}
|
||||
m_clipboard.clear();
|
||||
|
||||
@@ -1214,12 +1214,12 @@ ScriptModel::PasteTestResult ScriptModel::canPasteFromClipboard(qint64 time) con
|
||||
}
|
||||
catch (const QString &errMsg)
|
||||
{
|
||||
ERROR_LOG() << "checking for collision failed: " << errMsg;
|
||||
ERROR_LOG(m_logger) << "checking for collision failed: " << errMsg;
|
||||
return PasteTestResult::No;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG() << "checking for collision failed";
|
||||
ERROR_LOG(m_logger) << "checking for collision failed";
|
||||
return PasteTestResult::No;
|
||||
}
|
||||
}
|
||||
@@ -1386,7 +1386,7 @@ bool ScriptModel::canDropTopicType(TopicType _topicType, int _trackId) const
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << errMsg; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << errMsg; }
|
||||
catch (...) {}
|
||||
return false;
|
||||
}
|
||||
@@ -1469,8 +1469,8 @@ bool ScriptModel::isTopicItemBlocked(const TopicItem &_topicItem, const TopicTra
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed for itemId = " << _topicItem.id() << " and trackId = " << _topicTrack.id(); }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed for itemId = " << _topicItem.id() << " and trackId = " << _topicTrack.id(); }
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1500,8 +1500,8 @@ void ScriptModel::getActualFilterTopicRange(int parentTrackId, TopicItem &_topic
|
||||
if (_topicItem.startTime() + _topicItem.duration() > _mainTopicAtItemEnd.startTime() + _mainTopicAtItemEnd.duration())
|
||||
_topicItem.setDuration(_mainTopicAtItemEnd.startTime() + _mainTopicAtItemEnd.duration() - _topicItem.startTime());
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed for parentTrackId = " << parentTrackId; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed for parentTrackId = " << parentTrackId; }
|
||||
}
|
||||
|
||||
|
||||
@@ -1524,8 +1524,8 @@ void ScriptModel::onInsertTrack(const QModelIndex &idx)
|
||||
emit dataChanged(idx, idx);
|
||||
m_dialog->timeline()->view()->expand(idx);
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << errMsg; }
|
||||
catch (...) { ERROR_LOG() << "Adding child track to track with id = " << idx.internalId() << " failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << "Adding child track to track with id = " << idx.internalId() << " failed"; }
|
||||
}
|
||||
|
||||
void ScriptModel::onRemoveTrack(const QModelIndex &idx)
|
||||
@@ -1554,8 +1554,8 @@ void ScriptModel::onRemoveTrack(const QModelIndex &idx)
|
||||
}
|
||||
emit dataChanged(parentIndex, parentIndex);
|
||||
}
|
||||
catch (const QString &errMsg) { ERROR_LOG() << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG() << Q_FUNC_INFO << " failed"; }
|
||||
catch (const QString &errMsg) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " " << errMsg; }
|
||||
catch (...) { ERROR_LOG(m_logger) << Q_FUNC_INFO << " failed"; }
|
||||
}
|
||||
|
||||
}
|
||||
+2
@@ -117,6 +117,8 @@ public:
|
||||
bool canDropTopicType(TopicType _topicType, int _trackId) const;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool isTopicItemBlocked(const TopicItem &_topicItem, const TopicTrack &_topicTrack, qint64 start, int duration) const;
|
||||
|
||||
void getActualFilterTopicRange(int parentTrackId, TopicItem &_topicItem) const noexcept(false);
|
||||
|
||||
+1
@@ -43,6 +43,7 @@ public slots:
|
||||
void onPrint();
|
||||
void onColumnWidthChanged();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
LtsSession::LtsSession *m_session;
|
||||
|
||||
std::vector<TopicItem> m_topicItems;
|
||||
|
||||
+26
-27
@@ -26,15 +26,14 @@ static QString s_program(L("ffmpeg"));
|
||||
|
||||
TopicRecorder::TopicRecorder(const int topicId, const QString &topicName, const Screen *screen, qint32 offset,
|
||||
qint64 startTime, qint64 stopTime, const double topicX, const double topicY,
|
||||
const double topicW, const double topicH, QObject *parent)
|
||||
: QObject(parent)
|
||||
const double topicW, const double topicH, QObject *parent) : QObject(parent)
|
||||
, m_recordingProcess(new QProcess(this))
|
||||
, m_startTime(startTime)
|
||||
, m_stopTime(stopTime)
|
||||
, m_topicName(topicName)
|
||||
, m_topicId(topicId)
|
||||
, m_length((m_stopTime - (m_startTime - offset)) / 1000)
|
||||
{
|
||||
, m_length((m_stopTime - (m_startTime - offset)) / 1000),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
const auto screenGlobalPos = screen->mapToGlobal({0,0});
|
||||
const auto screenGeo = screen->geometry();
|
||||
|
||||
@@ -53,20 +52,20 @@ TopicRecorder::TopicRecorder(const int topicId, const QString &topicName, const
|
||||
const qint32 inputW = (qint32)(fullscreen ? screenW : screenW * topicW);
|
||||
const qint32 inputH = (qint32)(fullscreen ? screenH : screenH * topicH);
|
||||
|
||||
ERROR_LOG() << "TopicRecorder: fullscreen? " << fullscreen;
|
||||
ERROR_LOG() << "TopicRecorder: topic - x: " << topicX << ", y: " << topicY << ", w: " << topicW << ", h: " << topicH;
|
||||
ERROR_LOG() << "TopicRecorder: screen - x: " << screenX << ", y: " << screenY << ", w: " << screenW << ", h: " << screenH;
|
||||
ERROR_LOG() << "TopicRecorder: input - x: " << inputX << ", y: " << inputY << ", w: " << inputW << ", h: " << inputH;
|
||||
ERROR_LOG(m_logger) << "TopicRecorder: fullscreen? " << fullscreen;
|
||||
ERROR_LOG(m_logger) << "TopicRecorder: topic - x: " << topicX << ", y: " << topicY << ", w: " << topicW << ", h: " << topicH;
|
||||
ERROR_LOG(m_logger) << "TopicRecorder: screen - x: " << screenX << ", y: " << screenY << ", w: " << screenW << ", h: " << screenH;
|
||||
ERROR_LOG(m_logger) << "TopicRecorder: input - x: " << inputX << ", y: " << inputY << ", w: " << inputW << ", h: " << inputH;
|
||||
|
||||
if (!m_tmpRecordingFile.open())
|
||||
throw std::runtime_error(L("Failed to open temporary recording file: %1").arg(m_tmpRecordingFile.errorString()).toStdString());
|
||||
|
||||
m_recordingProcess->setProgram(s_program);
|
||||
m_recordingProcess->setArguments(L("-hide_banner -f x11grab -s %1x%2 -i :0.0+%3,%4 -c:v libx264 -y -map 0 -movflags +faststart -f %5 %6").arg(inputW).arg(inputH).arg(inputX).arg(inputY).arg(s_container).arg(m_tmpRecordingFile.fileName()).split(L(" ")));
|
||||
ERROR_LOG() << "args: " << m_recordingProcess->arguments().join(L(" "));
|
||||
connect(m_recordingProcess, &QProcess::readyReadStandardOutput, [this]() { ERROR_LOG() << "REC [ ]: " << QString::fromUtf8(m_recordingProcess->readAllStandardOutput()); });
|
||||
connect(m_recordingProcess, &QProcess::readyReadStandardError, [this]() { ERROR_LOG() << "REC [!]: " << QString::fromUtf8(m_recordingProcess->readAllStandardError()); });
|
||||
connect(m_recordingProcess, &QProcess::started, [this]() { ERROR_LOG() << "REC started successfully!"; });
|
||||
ERROR_LOG(m_logger) << "args: " << m_recordingProcess->arguments().join(L(" "));
|
||||
connect(m_recordingProcess, &QProcess::readyReadStandardOutput, [this]() { ERROR_LOG(m_logger) << "REC [ ]: " << QString::fromUtf8(m_recordingProcess->readAllStandardOutput()); });
|
||||
connect(m_recordingProcess, &QProcess::readyReadStandardError, [this]() { ERROR_LOG(m_logger) << "REC [!]: " << QString::fromUtf8(m_recordingProcess->readAllStandardError()); });
|
||||
connect(m_recordingProcess, &QProcess::started, [this]() { ERROR_LOG(m_logger) << "REC started successfully!"; });
|
||||
|
||||
if (!m_tmpCuttingFile.open())
|
||||
throw std::runtime_error(L("Failed to open temporary cutting file: %1").arg(m_tmpCuttingFile.errorString()).toStdString());
|
||||
@@ -96,11 +95,11 @@ void TopicRecorder::cut()
|
||||
cuttingProcess->setProgram(s_program);
|
||||
|
||||
cuttingProcess->setArguments(L("-hide_banner -y -sseof -%1 -i %2 -c:v libx264 -f %3 %4").arg(m_length).arg(m_tmpRecordingFile.fileName(), s_container, m_tmpCuttingFile.fileName()).split(L(" ")));
|
||||
connect(cuttingProcess, &QProcess::readyReadStandardOutput, this, [this, cuttingProcess]() { ERROR_LOG() << "CUT [ ]: " << QString::fromUtf8(cuttingProcess->readAllStandardOutput()); });
|
||||
connect(cuttingProcess, &QProcess::readyReadStandardError, this, [this, cuttingProcess]() { ERROR_LOG() << "CUT [!]: " << QString::fromUtf8(cuttingProcess->readAllStandardError()); });
|
||||
connect(cuttingProcess, &QProcess::started, this, [this]() { ERROR_LOG() << "CUT started successfully!"; });
|
||||
connect(cuttingProcess, &QProcess::readyReadStandardOutput, this, [this, cuttingProcess]() { ERROR_LOG(m_logger) << "CUT [ ]: " << QString::fromUtf8(cuttingProcess->readAllStandardOutput()); });
|
||||
connect(cuttingProcess, &QProcess::readyReadStandardError, this, [this, cuttingProcess]() { ERROR_LOG(m_logger) << "CUT [!]: " << QString::fromUtf8(cuttingProcess->readAllStandardError()); });
|
||||
connect(cuttingProcess, &QProcess::started, this, [this]() { ERROR_LOG(m_logger) << "CUT started successfully!"; });
|
||||
|
||||
ERROR_LOG() << "start cut";
|
||||
ERROR_LOG(m_logger) << "start cut";
|
||||
|
||||
cuttingProcess->start();
|
||||
|
||||
@@ -119,7 +118,7 @@ void TopicRecorder::cut()
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG() << "cut failed (error) with exitCode=" << cuttingProcess->exitCode() << " and exitStatus=" << (cuttingProcess->exitStatus() == QProcess::ExitStatus::CrashExit ? "Crash" : "Normal Exit");
|
||||
ERROR_LOG(m_logger) << "cut failed (error) with exitCode=" << cuttingProcess->exitCode() << " and exitStatus=" << (cuttingProcess->exitStatus() == QProcess::ExitStatus::CrashExit ? "Crash" : "Normal Exit");
|
||||
m_failed = true;
|
||||
cuttingProcess->deleteLater();
|
||||
return;
|
||||
@@ -127,14 +126,14 @@ void TopicRecorder::cut()
|
||||
|
||||
if (cuttingProcess->exitCode() != 0)
|
||||
{
|
||||
ERROR_LOG() << "cut failed with non-zero exitCode=" << cuttingProcess->exitCode() << " and exitStatus=" << (cuttingProcess->exitStatus() == QProcess::ExitStatus::CrashExit ? "Crash" : "Normal Exit");
|
||||
ERROR_LOG(m_logger) << "cut failed with non-zero exitCode=" << cuttingProcess->exitCode() << " and exitStatus=" << (cuttingProcess->exitStatus() == QProcess::ExitStatus::CrashExit ? "Crash" : "Normal Exit");
|
||||
m_failed = true;
|
||||
cuttingProcess->deleteLater();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ERROR_LOG() << "cut done";
|
||||
ERROR_LOG(m_logger) << "cut done";
|
||||
cuttingProcess->deleteLater();
|
||||
}
|
||||
|
||||
@@ -173,7 +172,7 @@ void TopicRecorder::onExportFailed(const QProcess::ProcessError error)
|
||||
|
||||
void TopicRecorder::onExportFailed(const QString &errorMessage)
|
||||
{
|
||||
ERROR_LOG() << "Export failed for topic '" << m_topicName << "': " << errorMessage;
|
||||
ERROR_LOG(m_logger) << "Export failed for topic '" << m_topicName << "': " << errorMessage;
|
||||
emit exportFailed(errorMessage);
|
||||
}
|
||||
|
||||
@@ -214,16 +213,16 @@ void TopicRecorder::waitForFinishedRecording()
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG() << "waitForFinishedRecording: catch!";
|
||||
ERROR_LOG(m_logger) << "waitForFinishedRecording: catch!";
|
||||
}
|
||||
|
||||
ERROR_LOG() << "waitForFinishedRecording: done waiting!";
|
||||
ERROR_LOG(m_logger) << "waitForFinishedRecording: done waiting!";
|
||||
}
|
||||
|
||||
|
||||
void TopicRecorder::onNewTime(qint64 time)
|
||||
{
|
||||
ERROR_LOG() << "onNewTime: " << time << ", startTime: " << m_startTime;
|
||||
ERROR_LOG(m_logger) << "onNewTime: " << time << ", startTime: " << m_startTime;
|
||||
|
||||
switch (m_recordingState)
|
||||
{
|
||||
@@ -231,9 +230,9 @@ void TopicRecorder::onNewTime(qint64 time)
|
||||
if (time < m_startTime)
|
||||
return;
|
||||
|
||||
ERROR_LOG() << "onNewTime: started at " << time << " while startTime is " << m_startTime;
|
||||
ERROR_LOG(m_logger) << "onNewTime: started at " << time << " while startTime is " << m_startTime;
|
||||
|
||||
ERROR_LOG() << "Starting \"" << processToString(m_recordingProcess) << "\"";
|
||||
ERROR_LOG(m_logger) << "Starting \"" << processToString(m_recordingProcess) << "\"";
|
||||
|
||||
m_recordingProcess->start();
|
||||
|
||||
@@ -244,7 +243,7 @@ void TopicRecorder::onNewTime(qint64 time)
|
||||
if (time < m_stopTime)
|
||||
return;
|
||||
|
||||
ERROR_LOG() << "Stopping recording for " << m_topicName;
|
||||
ERROR_LOG(m_logger) << "Stopping recording for " << m_topicName;
|
||||
|
||||
m_recordingProcess->terminate();
|
||||
|
||||
@@ -261,7 +260,7 @@ void TopicRecorder::onNewTime(qint64 time)
|
||||
void TopicRecorder::onRecordingProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
m_recordingState = RecordingState::Done;
|
||||
ERROR_LOG() << "Recording finished for " << m_topicName << ", with exitCode=" << exitCode << " and exitStatus=" << exitStatus;
|
||||
ERROR_LOG(m_logger) << "Recording finished for " << m_topicName << ", with exitCode=" << exitCode << " and exitStatus=" << exitStatus;
|
||||
|
||||
|
||||
|
||||
|
||||
+2
@@ -44,6 +44,8 @@ public Q_SLOTS:
|
||||
void onNewTime(qint64 time);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
enum class RecordingState
|
||||
{
|
||||
Waiting,
|
||||
|
||||
+7
-8
@@ -14,8 +14,7 @@ namespace PresentationManagement
|
||||
|
||||
TopicShotter::TopicShotter(const int topicId, const QString &topicName, const Screen *screen, qint32 offset,
|
||||
qint64 startTime, qint64 stopTime, const double topicX, const double topicY,
|
||||
const double topicW, const double topicH, const bool isFilterTopic, const QString &desc, QObject *parent)
|
||||
: QObject(parent)
|
||||
const double topicW, const double topicH, const bool isFilterTopic, const QString &desc, QObject *parent) : QObject(parent)
|
||||
, m_startTime(startTime)
|
||||
, m_topicName(topicName)
|
||||
, m_topicId(topicId)
|
||||
@@ -25,8 +24,8 @@ TopicShotter::TopicShotter(const int topicId, const QString &topicName, const Sc
|
||||
, m_topicW(topicW)
|
||||
, m_topicH(topicH)
|
||||
, m_desc(desc)
|
||||
, m_isFilterTopic(isFilterTopic)
|
||||
{}
|
||||
, m_isFilterTopic(isFilterTopic),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {}
|
||||
|
||||
|
||||
TopicShotter::~TopicShotter()
|
||||
@@ -48,7 +47,7 @@ void TopicShotter::saveRecording(const QString &saveToPath)
|
||||
|
||||
void TopicShotter::onExportFailed(const QString &errorMessage)
|
||||
{
|
||||
ERROR_LOG() << "Export failed for topic '" << m_topicName << "': " << errorMessage;
|
||||
ERROR_LOG(m_logger) << "Export failed for topic '" << m_topicName << "': " << errorMessage;
|
||||
emit exportFailed(errorMessage);
|
||||
}
|
||||
|
||||
@@ -59,7 +58,7 @@ void TopicShotter::onNewTime(qint64 time)
|
||||
const qint64 filterTopicDelay = (m_isFilterTopic ? 1000 : 0);
|
||||
const qint64 startTime = m_startTime + filterTopicDelay + 1000 ;
|
||||
|
||||
DEBUG_LOG() << "onNewTime: " << time << ", startTime: " << startTime << ", isFilterTopic? " << m_isFilterTopic << ", desc: " << m_desc;
|
||||
DEBUG_LOG(m_logger) << "onNewTime: " << time << ", startTime: " << startTime << ", isFilterTopic? " << m_isFilterTopic << ", desc: " << m_desc;
|
||||
|
||||
if (time < startTime)
|
||||
return;
|
||||
@@ -68,7 +67,7 @@ void TopicShotter::onNewTime(qint64 time)
|
||||
return;
|
||||
isStarted = true;
|
||||
|
||||
DEBUG_LOG() << "onNewTime: started at " << time << " while startTime is " << startTime;
|
||||
DEBUG_LOG(m_logger) << "onNewTime: started at " << time << " while startTime is " << startTime;
|
||||
|
||||
if (!m_tmpFile.open())
|
||||
{
|
||||
@@ -101,7 +100,7 @@ void TopicShotter::onNewTime(qint64 time)
|
||||
connect(t, &QTimer::timeout, this, [this, inputX, inputY, inputW, inputH, _screen]()
|
||||
{
|
||||
const WId winId = m_screen->winId();
|
||||
DEBUG_LOG() << "## CHEESE! ## grabWindow: x: " << inputX << ", y: " << inputY << ", w: " << inputW << ", h: " << inputH << ", name: " << m_topicName << ", id: " << m_topicId << ", desc: " << m_desc;
|
||||
DEBUG_LOG(m_logger) << "## CHEESE! ## grabWindow: x: " << inputX << ", y: " << inputY << ", w: " << inputW << ", h: " << inputH << ", name: " << m_topicName << ", id: " << m_topicId << ", desc: " << m_desc;
|
||||
const QPixmap pix = _screen->grabWindow(winId, inputX, inputY, inputW, inputH);
|
||||
|
||||
if (!pix.save(&m_tmpFile, "PNG"))
|
||||
|
||||
+2
@@ -41,6 +41,8 @@ private Q_SLOTS:
|
||||
void onExportFailed(const QString &errorMessage);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
const qint64 m_startTime;
|
||||
const QString m_topicName;
|
||||
QTemporaryFile m_tmpFile;
|
||||
|
||||
Reference in new issue
Block a user