Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
+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(m_logger) << "could not set initial operator id to " << operatorId;
|
||||
WARNING_LOG() << "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(m_logger) << "Changing status for presentation id = " << pre.id();
|
||||
DEBUG_LOG() << "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(m_logger) << "Failed to change status for presentation-script_chooser";
|
||||
ERROR_LOG() << "Failed to change status for presentation-script_chooser";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-3
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/PresentationManagement/Gui/Script/Common/preguiscriptcommon_export.h>
|
||||
#include <Lts/Plugins/PresentationManagement/Gui/Script/Common/preguiscriptcommon_export.h>
|
||||
#include <Plugins/PresentationManagement/pre_data_plugin_interface.h>
|
||||
#include <Services/OperatorManagement/opm_dtc.h>
|
||||
#include <LtsWidgets/lts_frameless_dialog.h>
|
||||
@@ -67,8 +67,6 @@ private:
|
||||
bool m_isImportDialog;
|
||||
|
||||
Ui::ScriptChooser *m_ui { nullptr };
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
std::shared_ptr<PresentationManagement::Interface::Ftc> m_ftc;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
|
||||
|
||||
+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(m_logger) << "Cannot load RecordReplayPlugin " << pi.fileName;
|
||||
ERROR_LOG() << "Cannot load RecordReplayPlugin " << pi.fileName;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!recPlugin->initCopy(m_exerciseId, m_bSupportsSchemasFrom, m_bSupportsSchemasTo))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Initialisation for RecordReplayPlugin " << pi.fileName << " failed ";
|
||||
ERROR_LOG() << "Initialisation for RecordReplayPlugin " << pi.fileName << " failed ";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << "Loaded record replay plugin " << recPlugin->pluginName();
|
||||
INFO_LOG() << "Loaded record replay plugin " << recPlugin->pluginName();
|
||||
m_plugins += recPlugin;
|
||||
|
||||
return true;
|
||||
@@ -89,7 +89,7 @@ bool DbReader::createTables()
|
||||
|
||||
if (record.isEmpty())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Empty record for " << fqTableName;
|
||||
ERROR_LOG() << "Empty record for " << fqTableName;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ bool DbReader::createTables()
|
||||
|
||||
bool DbReader::copyData(qint64 fromTime, qint64 toTime)
|
||||
{
|
||||
INFO_LOG(m_logger) << "IN readData";
|
||||
INFO_LOG() << "IN readData";
|
||||
if (!m_queryFrom || !m_queryTo)
|
||||
return false;
|
||||
|
||||
|
||||
-2
@@ -41,7 +41,5 @@ private:
|
||||
bool m_bSupportsSchemasTo;
|
||||
|
||||
QVector<RecordReplay::RecordReplayPlugin*> m_plugins;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
}
|
||||
+8
-8
@@ -61,12 +61,12 @@ void DVDWriter::incomingDataAvailable()
|
||||
while (m_dvdBurnProcess && m_dvdBurnProcess->canReadLine())
|
||||
{
|
||||
const QByteArray qB = m_dvdBurnProcess->readLine().trimmed();
|
||||
INFO_LOG(m_logger) << "qb = " << qB.data()
|
||||
INFO_LOG() << "qb = " << qB.data()
|
||||
<< " m_packageDir=" << m_packageDir;
|
||||
|
||||
if (qB.contains(":-["))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "growisofs error: '" << qB << "'";
|
||||
ERROR_LOG() << "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(m_logger) << "growisofs error: '" << qB << "'";
|
||||
ERROR_LOG() << "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(m_logger) << "growisofs error: '" << qB << "'";
|
||||
ERROR_LOG() << "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(m_logger) << "growisofs error: '" << qB << "'";
|
||||
ERROR_LOG() << "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(m_logger) << "growisofs ends with extitCode : '" << exitCode << " and ExitStatus '" << exitStatus;
|
||||
INFO_LOG() << "growisofs ends with extitCode : '" << exitCode << " and ExitStatus '" << exitStatus;
|
||||
|
||||
|
||||
if (!m_dvdBurnProcess)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "dvdFinished with error code: " << exitCode << ", status: " << exitStatus
|
||||
WARNING_LOG() << "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(m_logger) << "dvdFinished with error code: " << exitCode << ", status: " << exitStatus;
|
||||
ERROR_LOG() << "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);
|
||||
}
|
||||
|
||||
-1
@@ -43,6 +43,5 @@ private:
|
||||
|
||||
QString m_packageDir;
|
||||
QPointer<QProcess> m_dvdBurnProcess;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
#include <QtGlobal>
|
||||
#include <Plugins/PresentationManagement/Gui/Script/Common/preguiscriptcommon_export.h>
|
||||
#include <Lts/Plugins/PresentationManagement/Gui/Script/Common/preguiscriptcommon_export.h>
|
||||
|
||||
namespace TakeHomePackageGenerator
|
||||
{
|
||||
|
||||
+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(m_logger) << "Invalid content for type (" << content.presentationTopicType() << "): " << QString::fromStdString(content.presentationTopicType());
|
||||
ERROR_LOG() << "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(m_logger) << "Invalid content for presentation type " << content.presentationTopicType();
|
||||
ERROR_LOG() << "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(m_logger) << "addEntry type: " << addData.topicType << ", ifc: " << topicExportIfc;
|
||||
DEBUG_LOG() << "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(m_logger) << "topic count: " << m_cntTopicsToExport;
|
||||
DEBUG_LOG() << "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(m_logger) << "Adding filter step " << data.topicType;
|
||||
DEBUG_LOG() << "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(m_logger) << "Invalid content for presentation type " << type;
|
||||
WARNING_LOG() << "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(m_logger) << "Could not find replay interface for " << type;
|
||||
WARNING_LOG() << "Could not find replay interface for " << type;
|
||||
return topicIfc;
|
||||
}
|
||||
|
||||
@@ -319,13 +319,13 @@ void ExportProcess::slotRunExportStep()
|
||||
{
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ExportProcess::slotRunExportStep() CALLED, m_vecExportSteps.size(): " << m_vecExportSteps.size()
|
||||
DEBUG_LOG() << "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_logger) << "m_vecExportSteps: " << s << " compare: " << (s == sender());
|
||||
DEBUG_LOG() << "m_vecExportSteps: " << s << " compare: " << (s == sender());
|
||||
for (const auto &s : std::as_const(m_vecExportStepsExecuted))
|
||||
DEBUG_LOG(m_logger) << "m_vecExportStepsExecuted: " << s << " compare: " << (s == sender());
|
||||
DEBUG_LOG() << "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(m_logger) << strExportLabel;
|
||||
DEBUG_LOG() << 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(m_logger) << "Add exercise to ExportRootPath";
|
||||
DEBUG_LOG() << "Add exercise to ExportRootPath";
|
||||
QFile file(exportRootPath() + QStringLiteral("exercises.json"));
|
||||
if (!file.open(QFile::ReadWrite))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Can not open " << file.fileName() << " for read/write: " << file.errorString();
|
||||
WARNING_LOG() << "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(m_logger) << " file.write " << QJsonDocument(obj).toJson(QJsonDocument::Indented);
|
||||
INFO_LOG() << " file.write " << QJsonDocument(obj).toJson(QJsonDocument::Indented);
|
||||
file.close();
|
||||
}
|
||||
|
||||
QFile file(exportPath(m_pSession->exerciseId()) + QStringLiteral("data.json"));
|
||||
INFO_LOG(m_logger) << "ExportProcess::createDataJson " << exportPath(m_pSession->exerciseId()) + QStringLiteral("data.json");
|
||||
INFO_LOG() << "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(m_logger) << " file.write " << QJsonDocument(obj).toJson(QJsonDocument::Indented);
|
||||
INFO_LOG() << " file.write " << QJsonDocument(obj).toJson(QJsonDocument::Indented);
|
||||
file.close();
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ void ExportProcess::createPresentationTable()
|
||||
{
|
||||
if (s->exportFailed())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Export failed for " << s->topicId();
|
||||
WARNING_LOG() << "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(m_logger) << "Could not find thp static content directory exportPath=" << exportPathStr;
|
||||
WARNING_LOG() << "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(m_logger) << "Could not find thp_standalone static content directory exportPath=" << exportPathStr + QDir::separator() + QString::number(m_scriptId);
|
||||
WARNING_LOG() << "Could not find thp_standalone static content directory exportPath=" << exportPathStr + QDir::separator() + QString::number(m_scriptId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -6,7 +6,7 @@
|
||||
#include <QObject>
|
||||
#include <QJsonArray>
|
||||
|
||||
#include <Plugins/PresentationManagement/Gui/Script/Common/preguiscriptcommon_export.h>
|
||||
#include <Lts/Plugins/PresentationManagement/Gui/Script/Common/preguiscriptcommon_export.h>
|
||||
#include <Plugins/PresentationManagement/Gui/Common/topic_assignment.h>
|
||||
#include <Plugins/SituationReplay/srp_gui_plugin_interface.h>
|
||||
#include <PresentationManagement/pre_dtc.h>
|
||||
@@ -114,7 +114,5 @@ private:
|
||||
std::shared_ptr<SituationReplay::ForeignGuiInterface> m_replayGuiIfc;
|
||||
QProgressDialog *m_pProgressDlg;
|
||||
int m_cntTopicsToExport;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/PresentationManagement/Gui/Script/Common/preguiscriptcommon_export.h>
|
||||
#include <Lts/Plugins/PresentationManagement/Gui/Script/Common/preguiscriptcommon_export.h>
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
+11
-11
@@ -41,7 +41,7 @@ SituationExporter::~SituationExporter()
|
||||
|
||||
bool SituationExporter::exportStaticData(const QString &strPathToFile)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Exporting static data to " << strPathToFile;
|
||||
DEBUG_LOG() << "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(m_logger) << "Copying table " << t.schema << "." << t.table << " failed... ";
|
||||
ERROR_LOG() << "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(m_logger) << "Copying table " << t.schema << "." << t.table << " failed... ";
|
||||
ERROR_LOG() << "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(m_logger) << "Copying " << fqTableName << " started";
|
||||
DEBUG_LOG() << "Copying " << fqTableName << " started";
|
||||
const QSqlRecord record = m_dbIn.record(fqTableName);
|
||||
if (record.isEmpty())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Empty record for " << fqTableName;
|
||||
ERROR_LOG() << "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(m_logger) << selectTableCommand;
|
||||
DEBUG_LOG(m_logger) << insertTableCommand;
|
||||
DEBUG_LOG() << selectTableCommand;
|
||||
DEBUG_LOG() << insertTableCommand;
|
||||
|
||||
if (!qOut.prepare(insertTableCommand))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "qOut prepare failed... " << qOut.lastError().text();
|
||||
ERROR_LOG() << "qOut prepare failed... " << qOut.lastError().text();
|
||||
return false;
|
||||
}
|
||||
if (!qIn.exec(selectTableCommand))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "qIn select failed... " << qIn.lastError().text();
|
||||
ERROR_LOG() << "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(m_logger) << "qOut insert failed.. " << qOut.lastError().text();
|
||||
ERROR_LOG() << "qOut insert failed.. " << qOut.lastError().text();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Copying " << fqTableName << " finished";
|
||||
DEBUG_LOG() << "Copying " << fqTableName << " finished";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
-1
@@ -30,6 +30,5 @@ private:
|
||||
int m_exerciseId;
|
||||
QSqlDatabase m_dbIn;
|
||||
QSqlDatabase m_dbOut;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/PresentationManagement/Gui/Script/Common/preguiscriptcommon_export.h>
|
||||
#include <Lts/Plugins/PresentationManagement/Gui/Script/Common/preguiscriptcommon_export.h>
|
||||
#include <TopicEditorBase/topic_editor_utils.h>
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
Reference in new issue
Block a user