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
+25
-26
@@ -32,14 +32,13 @@ HandlerReportData::HandlerReportData(const std::shared_ptr<DdsHandler> &ddsHandl
|
||||
, m_db(db)
|
||||
, m_ppmDtc(nullptr)
|
||||
, m_aesDtc(nullptr)
|
||||
, m_logger(getLogger("HandlerReportData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool HandlerReportData::init()
|
||||
{
|
||||
INFO_LOG(m_logger) << "start init() DTC HandlerReportData ";
|
||||
INFO_LOG() << "start init() DTC HandlerReportData ";
|
||||
|
||||
bool bRet = true;
|
||||
auto cbReport = [this, &bRet](Database::RepReport dbData)
|
||||
@@ -50,7 +49,7 @@ bool HandlerReportData::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
bRet = false;
|
||||
return;
|
||||
}
|
||||
@@ -63,7 +62,7 @@ bool HandlerReportData::init()
|
||||
m_ppmDtc = ParticipantManagement::Interface::Dtc::create(m_ddsHandler->ddsConnector());
|
||||
if (m_ppmDtc == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not create PPM DTC";
|
||||
ERROR_LOG() << "Could not create PPM DTC";
|
||||
return false;
|
||||
}
|
||||
m_ppmDtc->enableParticipant();
|
||||
@@ -73,7 +72,7 @@ bool HandlerReportData::init()
|
||||
m_aesDtc = AreaEffectSimulation::Interface::Dtc::create(m_ddsHandler->ddsConnector());
|
||||
if (m_aesDtc == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not create AES DTC";
|
||||
ERROR_LOG() << "Could not create AES DTC";
|
||||
return false;
|
||||
}
|
||||
m_aesDtc->enableMineArea();
|
||||
@@ -98,7 +97,7 @@ QString HandlerReportData::intVecToString(const std::vector<int> &intVec)
|
||||
void HandlerReportData::onCreateModifyReportRequest(const rti::core::SampleIdentity &cookie,
|
||||
const CreateModifyReportRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onCreateModifyReportRequest" << request;
|
||||
DEBUG_LOG() << "onCreateModifyReportRequest" << request;
|
||||
|
||||
m_updateReportCookie = cookie;
|
||||
|
||||
@@ -119,12 +118,12 @@ void HandlerReportData::onCreateModifyReportRequest(const rti::core::SampleIdent
|
||||
ReportType repType = request.reportType(); // assuming this cannot be changed by this request
|
||||
ok = removeReportData(reportId, repType); // remove old data
|
||||
if (!ok)
|
||||
WARNING_LOG(m_logger) << "Cannot remove old data for report id = " << reportId;
|
||||
WARNING_LOG() << "Cannot remove old data for report id = " << reportId;
|
||||
}
|
||||
|
||||
if (!insertReportData(request, reportId))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error while creating report!";
|
||||
ERROR_LOG() << "Error while creating report!";
|
||||
m_reply.errorString(tr_lts("dds","Error while creating report"));
|
||||
m_reply.replyState(Core::FtReplyState::Error);
|
||||
m_reply.currentTime(QDateTime::currentMSecsSinceEpoch());
|
||||
@@ -215,7 +214,7 @@ void HandlerReportData::onCreateModifyReportRequest(const rti::core::SampleIdent
|
||||
|
||||
default:
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Report Type unknown, not generating.";
|
||||
WARNING_LOG() << "Report Type unknown, not generating.";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -226,7 +225,7 @@ void HandlerReportData::onCreateModifyReportRequest(const rti::core::SampleIdent
|
||||
objRep->removeObject();
|
||||
m_objReportMap.remove(reportId);
|
||||
|
||||
ERROR_LOG(m_logger) << "Error generating report with type " << request.reportType();
|
||||
ERROR_LOG() << "Error generating report with type " << request.reportType();
|
||||
m_reply.errorString(tr_lts("dds", "Error generating report"));
|
||||
m_reply.replyState(Core::FtReplyState::Error);
|
||||
m_reply.currentTime(QDateTime::currentMSecsSinceEpoch());
|
||||
@@ -245,7 +244,7 @@ void HandlerReportData::onCreateModifyReportRequest(const rti::core::SampleIdent
|
||||
void HandlerReportData::onRemoveReportRequest(const rti::core::SampleIdentity &cookie,
|
||||
const Core::RemoveElementRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onRemoveReportRequest " << request;
|
||||
DEBUG_LOG() << "onRemoveReportRequest " << request;
|
||||
|
||||
int reportId = request.id();
|
||||
|
||||
@@ -263,7 +262,7 @@ void HandlerReportData::onRemoveReportRequest(const rti::core::SampleIdentity &c
|
||||
ret = ifs->removeObject();
|
||||
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
else
|
||||
{
|
||||
// delete ObjectReportInfo
|
||||
@@ -282,7 +281,7 @@ void HandlerReportData::onRemoveReportRequest(const rti::core::SampleIdentity &c
|
||||
//-----------------------------------------------------------------------------
|
||||
bool HandlerReportData::removeReportData(int reportId, ReportType repType)
|
||||
{
|
||||
INFO_LOG(m_logger) << "IN removeReportData";
|
||||
INFO_LOG() << "IN removeReportData";
|
||||
|
||||
bool ok = true;
|
||||
|
||||
@@ -364,13 +363,13 @@ bool HandlerReportData::removeReportData(int reportId, ReportType repType)
|
||||
}
|
||||
default:
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Report Type unknown, cannot remove generated data";
|
||||
WARNING_LOG() << "Report Type unknown, cannot remove generated data";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ok)
|
||||
WARNING_LOG(m_logger) << "Could not remove old generated data for report id = " << reportId;
|
||||
WARNING_LOG() << "Could not remove old generated data for report id = " << reportId;
|
||||
|
||||
return ok;
|
||||
}
|
||||
@@ -379,7 +378,7 @@ bool HandlerReportData::removeReportData(int reportId, ReportType repType)
|
||||
void HandlerReportData::onReportChangeStatusRequest(const rti::core::SampleIdentity &cookie,
|
||||
const ReportChangeStatusRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onReportChangeStatusRequest " << request;
|
||||
DEBUG_LOG() << "onReportChangeStatusRequest " << request;
|
||||
ObjectReportInfo *ifs = m_objReportMap.value(request.id());
|
||||
if (ifs == nullptr)
|
||||
{
|
||||
@@ -389,7 +388,7 @@ void HandlerReportData::onReportChangeStatusRequest(const rti::core::SampleIdent
|
||||
}
|
||||
Core::FunctionReplyObject ret = ifs->changeStatus(request);
|
||||
if (ret.error())
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
|
||||
m_ddsHandler->fts()->reportChangeStatusReply(cookie, ret);
|
||||
}
|
||||
@@ -497,7 +496,7 @@ bool HandlerReportData::insertReportData(const CreateModifyReportRequest &reques
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
return false;
|
||||
}
|
||||
m_objReportMap.insert(ifs->getId(), ifs);
|
||||
@@ -510,14 +509,14 @@ bool HandlerReportData::insertReportData(const CreateModifyReportRequest &reques
|
||||
ObjectReportInfo *ifs = m_objReportMap.value(reportId);
|
||||
if (!ifs)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Report not found - report id = " << reportId;
|
||||
ERROR_LOG() << "Report not found - report id = " << reportId;
|
||||
return false;
|
||||
}
|
||||
Core::FunctionReplyObject ret = ifs->updateObject(data);
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -527,7 +526,7 @@ bool HandlerReportData::insertReportData(const CreateModifyReportRequest &reques
|
||||
// -----------------------------------------------------------------------------------
|
||||
bool HandlerReportData::removeReportDataResult(int reportId, const QString &tableName)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Start removeReportDataResult";
|
||||
DEBUG_LOG() << "Start removeReportDataResult";
|
||||
|
||||
DBTransaction trans(m_db->database());
|
||||
NSqlQuery q(m_db->database());
|
||||
@@ -537,17 +536,17 @@ bool HandlerReportData::removeReportDataResult(int reportId, const QString &tabl
|
||||
q.prepare(stmt);
|
||||
q.bindValue(QStringLiteral(":reportId"), reportId);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Statement: " << stmt;
|
||||
DEBUG_LOG() << "Statement: " << stmt;
|
||||
|
||||
if (!q.exec())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error removing report data for report id = " << reportId;
|
||||
ERROR_LOG() << "Error removing report data for report id = " << reportId;
|
||||
return false;
|
||||
}
|
||||
|
||||
trans.commit();
|
||||
|
||||
DEBUG_LOG(m_logger) << " END removeReportDataResult";
|
||||
DEBUG_LOG() << " END removeReportDataResult";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -555,7 +554,7 @@ bool HandlerReportData::removeReportDataResult(int reportId, const QString &tabl
|
||||
// -----------------------------------------------------------------------------------
|
||||
void HandlerReportData::checkElapsedTimer(QElapsedTimer &t)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "checkElapsedTimer ...";
|
||||
TRACE_LOG() << "checkElapsedTimer ...";
|
||||
if (t.elapsed() > 5 * 1000)
|
||||
{
|
||||
t.start();
|
||||
@@ -566,7 +565,7 @@ void HandlerReportData::checkElapsedTimer(QElapsedTimer &t)
|
||||
// -----------------------------------------------------------------------------------
|
||||
void HandlerReportData::updateReportReply()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "updateReportReply: " << m_reply;
|
||||
DEBUG_LOG() << "updateReportReply: " << m_reply;
|
||||
m_reply.currentTime(QDateTime::currentMSecsSinceEpoch());
|
||||
m_ddsHandler->fts()->createModifyReportReply(m_updateReportCookie, m_reply);
|
||||
m_ddsHandler->pacemaker()->publishState();
|
||||
|
||||
-2
@@ -317,7 +317,5 @@ class HandlerReportData final
|
||||
|
||||
rti::core::SampleIdentity m_updateReportCookie;
|
||||
UpdateReportReply m_reply;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace ReportManagement
|
||||
+5
-6
@@ -26,7 +26,6 @@ HandlerReportGetData::HandlerReportGetData(const std::shared_ptr<DdsHandler> &dd
|
||||
: Interface::Fts::GetReportDataRequestHandler(ddsHandler->fts())
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_db(db)
|
||||
, m_logger(getLogger("HandlerReportGetData"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -43,7 +42,7 @@ void HandlerReportGetData::onGetReportDataRequest(const rti::core::SampleIdentit
|
||||
if (ret.errorString().size() != 0)
|
||||
{
|
||||
Core::FunctionReplyObject fro(ret.id(), ret.errorString(), ret.errorParams());
|
||||
WARNING_LOG(m_logger) << "error: " << fro();
|
||||
WARNING_LOG() << "error: " << fro();
|
||||
}
|
||||
m_ddsHandler->fts()->getReportDataReply(cookie, ret);
|
||||
}
|
||||
@@ -51,7 +50,7 @@ void HandlerReportGetData::onGetReportDataRequest(const rti::core::SampleIdentit
|
||||
//-----------------------------------------------------------------------------
|
||||
GetReportDataReply HandlerReportGetData::getReportDataRequest(const GetReportDataRequest &request)
|
||||
{
|
||||
INFO_LOG(m_logger) << "IN onGetReportDataRequest";
|
||||
INFO_LOG() << "IN onGetReportDataRequest";
|
||||
|
||||
// Get data per reportType
|
||||
QByteArray reportData;
|
||||
@@ -105,7 +104,7 @@ GetReportDataReply HandlerReportGetData::getReportDataRequest(const GetReportDat
|
||||
reportData = getTreatmentTimelineResult(request.reportId());
|
||||
break;
|
||||
default:
|
||||
WARNING_LOG(m_logger) << "Report Type unknown, no generating.";
|
||||
WARNING_LOG() << "Report Type unknown, no generating.";
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -446,14 +445,14 @@ QByteArray HandlerReportGetData::getSanitationMaterialResult(int reportId) const
|
||||
|
||||
QString stmt = QLatin1String("SELECT id, material_id, sanitation_unique_id, qualification, amount_start, amount_resupplied, amount_end, amount_used, duration FROM "
|
||||
"rep_sanitation_material_result WHERE report_id = :reportId ORDER BY sanitation_unique_id, qualification, material_id");
|
||||
DEBUG_LOG(m_logger) << " stmt: " << stmt;
|
||||
DEBUG_LOG() << " stmt: " << stmt;
|
||||
|
||||
qSelect.prepare(stmt);
|
||||
qSelect.bindValue(QLatin1String(":reportId"), reportId);
|
||||
|
||||
if (!qSelect.exec())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Couldn't select sanitation material result ";
|
||||
ERROR_LOG() << "Couldn't select sanitation material result ";
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ private: // attributes
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler; ///< Pointer to DDS handler
|
||||
std::shared_ptr<DatabaseInterface> m_db;
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
|
||||
};
|
||||
} // namespace ReportManagement
|
||||
|
||||
-1
@@ -23,7 +23,6 @@ MainHandler::MainHandler(QObject *parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_dbHandler(nullptr)
|
||||
, m_preService(nullptr)
|
||||
, m_logger(getLogger("MainHandlerGenerator"))
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
|
||||
@@ -44,7 +44,5 @@ private:
|
||||
std::shared_ptr<HandlerReportGetData> m_reportGetData;
|
||||
//external
|
||||
PresentationManagement::Initialization *m_preService;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace ReportManagement
|
||||
+4
-5
@@ -24,7 +24,6 @@ ObjectReportInfo::ObjectReportInfo(const std::shared_ptr<DdsHandler> &ddsHandler
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_db(db)
|
||||
, m_logger(getLogger("ObjectReportInfo"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -51,7 +50,7 @@ Core::FunctionReplyObject ObjectReportInfo::createObject(Database::RepReport &db
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting RepReport-data into database"));
|
||||
|
||||
m_data.id = dbData.id;
|
||||
DEBUG_LOG(m_logger) << "New reportId: " << m_data.id;
|
||||
DEBUG_LOG() << "New reportId: " << m_data.id;
|
||||
}
|
||||
|
||||
// Publish Data via DTS
|
||||
@@ -70,7 +69,7 @@ Core::FunctionReplyObject ObjectReportInfo::updateObject(const Database::RepRepo
|
||||
return Core::FunctionReplyObject(dbData.id, tr_lts("dds", "Error updating RepReport-data into database"));
|
||||
|
||||
m_data = dbData;
|
||||
DEBUG_LOG(m_logger) << "Data changed for reportId: " << m_data.id;
|
||||
DEBUG_LOG() << "Data changed for reportId: " << m_data.id;
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
@@ -111,11 +110,11 @@ Core::FunctionReplyObject ObjectReportInfo::changeStatus(const ReportChangeStatu
|
||||
//------------------------------------------------------------------------------
|
||||
void ObjectReportInfo::onPublishData()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Publish ReportInfo-data to dds (" << m_data.id << ") ...";
|
||||
INFO_LOG() << "Publish ReportInfo-data to dds (" << m_data.id << ") ...";
|
||||
ReportInfo data = toDdsData(m_data);
|
||||
|
||||
if (!m_ddsHandler->dts()->publish(data))
|
||||
ERROR_LOG(m_logger) << "Error publishing ReportInfo-data to dds";
|
||||
ERROR_LOG() << "Error publishing ReportInfo-data to dds";
|
||||
}
|
||||
|
||||
// TODO: add in LtsUtils ?
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include "dds_handler.h"
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
// Generated
|
||||
#include <ReportManagement/rep_db.h>
|
||||
|
||||
Reference in new issue
Block a user