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
+18
-19
@@ -25,7 +25,6 @@ const QString CONTENT_ARG = QStringLiteral("contentArg");
|
||||
ObjectNotification::ObjectNotification(const std::shared_ptr<DdsHandler> &ddsHandler, const std::shared_ptr<DatabaseInterface> &db)
|
||||
: m_ddsHandler(ddsHandler)
|
||||
, m_db(db)
|
||||
, m_logger(getLogger("ObjectNotification"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -47,9 +46,9 @@ Core::FunctionReplyObject ObjectNotification::createObject(const NomNotification
|
||||
|
||||
// Neue DB Id in lokale Struktur uebernehmen
|
||||
m_dataNotificationObject.id(dbDataNotification.id);
|
||||
DEBUG_LOG(m_logger) << "New NotificationId: " << dbDataNotification.id;
|
||||
DEBUG_LOG() << "New NotificationId: " << dbDataNotification.id;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Handle Address for notificationId:" << dbDataNotification.id << " number of depending recipients: " << data.recipientIds().size();
|
||||
DEBUG_LOG() << "Handle Address for notificationId:" << dbDataNotification.id << " number of depending recipients: " << data.recipientIds().size();
|
||||
|
||||
// Behandlung von Recipients
|
||||
for (size_t i = 0; i < data.recipientIds().size(); ++i)
|
||||
@@ -99,7 +98,7 @@ QString ObjectNotification::contentArgsToJson()
|
||||
|
||||
for (const std::string& arg : std::as_const(m_dataNotificationObject.contentArgs()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << ".arg() ersetzt immer den kleinsten freien Platzhalter"
|
||||
DEBUG_LOG() << ".arg() ersetzt immer den kleinsten freien Platzhalter"
|
||||
<< ", arg=" << arg;
|
||||
QJsonObject argObj;
|
||||
argObj[CONTENT_ID] = i;
|
||||
@@ -111,18 +110,18 @@ QString ObjectNotification::contentArgsToJson()
|
||||
mainObject[TRANSLATION_ARGS] = jsonArray;
|
||||
|
||||
QJsonDocument doc(mainObject);
|
||||
DEBUG_LOG(m_logger) << "ObjectNotification::contentArgsToJson properties=" << QString::fromUtf8(doc.toJson(QJsonDocument::Compact));
|
||||
DEBUG_LOG() << "ObjectNotification::contentArgsToJson properties=" << QString::fromUtf8(doc.toJson(QJsonDocument::Compact));
|
||||
return QString::fromUtf8(doc.toJson(QJsonDocument::Compact));
|
||||
}
|
||||
|
||||
std::vector<std::string> ObjectNotification::jsonToContentArgs(const QString &jsonString)
|
||||
{
|
||||
//DEBUG_LOG(m_logger) << "jsonToContentArgs jsonString=" << jsonString;
|
||||
//DEBUG_LOG() << "jsonToContentArgs jsonString=" << jsonString;
|
||||
std::vector<std::string> result;
|
||||
// 1. String parsen
|
||||
QJsonDocument doc = QJsonDocument::fromJson(jsonString.toUtf8());
|
||||
if (!doc.isObject()) {
|
||||
//WARNING_LOG(m_logger) << "properties: Invalid JSON-Object";
|
||||
//WARNING_LOG() << "properties: Invalid JSON-Object";
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -130,7 +129,7 @@ std::vector<std::string> ObjectNotification::jsonToContentArgs(const QString &js
|
||||
|
||||
// 2. Das Array aus "translationsArgs" herausholen
|
||||
if (!hauptObjekt.contains(TRANSLATION_ARGS) || !hauptObjekt[TRANSLATION_ARGS].isArray()) {
|
||||
//WARNING_LOG(m_logger) << "Missing or invalid 'translationsArgs' key (must be an array).";
|
||||
//WARNING_LOG() << "Missing or invalid 'translationsArgs' key (must be an array).";
|
||||
return result;
|
||||
}
|
||||
QJsonArray jsonArray = hauptObjekt[TRANSLATION_ARGS].toArray();
|
||||
@@ -149,8 +148,8 @@ std::vector<std::string> ObjectNotification::jsonToContentArgs(const QString &js
|
||||
// 4. Zugriff über die ID testen
|
||||
if (sucheMap.contains(gesuchteId)) {
|
||||
QJsonObject treffer = sucheMap[gesuchteId];
|
||||
//DEBUG_LOG(m_logger) << "ID" << gesuchteId << "gefunden!";
|
||||
//DEBUG_LOG(m_logger) << "Inhalt:" << treffer[CONTENT_ARG].toString();
|
||||
//DEBUG_LOG() << "ID" << gesuchteId << "gefunden!";
|
||||
//DEBUG_LOG() << "Inhalt:" << treffer[CONTENT_ARG].toString();
|
||||
QString contentStr = treffer[CONTENT_ARG].toString();
|
||||
result.emplace_back(contentStr.toStdString());
|
||||
} else {
|
||||
@@ -178,7 +177,7 @@ Core::FunctionReplyObject ObjectNotification::readReceipt(const ReadReceipt &dat
|
||||
continue;
|
||||
|
||||
dbDataAddr = toDbData(recipientAddr);
|
||||
DEBUG_LOG(m_logger) << "Found Operator " << data.operatorId() << " with repicpentID " << dbDataAddr.id;
|
||||
DEBUG_LOG() << "Found Operator " << data.operatorId() << " with repicpentID " << dbDataAddr.id;
|
||||
dbDataAddr.notificationId = dbDataNotification.id;
|
||||
|
||||
break;
|
||||
@@ -207,7 +206,7 @@ Core::FunctionReplyObject ObjectNotification::readReceipt(const ReadReceipt &dat
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Notification already processed id=" << notificationId;
|
||||
DEBUG_LOG() << "Notification already processed id=" << notificationId;
|
||||
return Core::FunctionReplyObject(dbDataNotification.processed, {}, {}, tr_lts("dds", "Notification already processed"));
|
||||
}
|
||||
}
|
||||
@@ -217,7 +216,7 @@ Core::FunctionReplyObject ObjectNotification::readReceipt(const ReadReceipt &dat
|
||||
|
||||
trans.commit();
|
||||
|
||||
INFO_LOG(m_logger) << "Data changed for NotificationId: " << m_dataNotificationObject.id();
|
||||
INFO_LOG() << "Data changed for NotificationId: " << m_dataNotificationObject.id();
|
||||
|
||||
const std::vector<Address> recipients = m_dataNotificationObject.recipientIds();
|
||||
const Address sender = m_dataNotificationObject.sender();
|
||||
@@ -250,7 +249,7 @@ Core::FunctionReplyObject ObjectNotification::deleteMessage(const DeleteMessage
|
||||
|
||||
for (const Address &recipientAddr : std::as_const(m_dataNotificationObject.recipientIds()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "recipientAddr="
|
||||
DEBUG_LOG() << "recipientAddr="
|
||||
<< ", id: " << recipientAddr.id() << ", addressId: " << recipientAddr.addressId() << ", isDeleted: " << recipientAddr.isDeleted();
|
||||
if (data.operatorId() > 0 && recipientAddr.addressType() == AddressType_def::Operator && recipientAddr.addressId() != data.operatorId())
|
||||
continue;
|
||||
@@ -276,7 +275,7 @@ Core::FunctionReplyObject ObjectNotification::deleteMessage(const DeleteMessage
|
||||
|
||||
trans.commit();
|
||||
|
||||
INFO_LOG(m_logger) << "Data changed for NotificationId: " << m_dataNotificationObject.id();
|
||||
INFO_LOG() << "Data changed for NotificationId: " << m_dataNotificationObject.id();
|
||||
|
||||
std::vector<Address> recipients = m_dataNotificationObject.recipientIds();
|
||||
Address sender = m_dataNotificationObject.sender();
|
||||
@@ -285,7 +284,7 @@ Core::FunctionReplyObject ObjectNotification::deleteMessage(const DeleteMessage
|
||||
|
||||
for (const Address &addr : std::as_const(recipients))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "addr="
|
||||
DEBUG_LOG() << "addr="
|
||||
<< ", id: " << addr.id() << ", addressId: " << addr.addressId() << ", isDeleted: " << addr.isDeleted();
|
||||
|
||||
if (addr.id() == dbDataAddr.id)
|
||||
@@ -303,7 +302,7 @@ Core::FunctionReplyObject ObjectNotification::deleteMessage(const DeleteMessage
|
||||
|
||||
Core::FunctionReplyObject ObjectNotification::deleteObject(const DeleteMessage &data, int notificationId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ObjectNotification::deleteObject"
|
||||
DEBUG_LOG() << "ObjectNotification::deleteObject"
|
||||
<< ", notificationId: " << notificationId << ", addressId: " << data.addressId() << ", operatorId: " << data.operatorId()
|
||||
<< ", workstationId: " << data.workstationId();
|
||||
deleteMessage(data, notificationId);
|
||||
@@ -329,10 +328,10 @@ bool ObjectNotification::isValid() const { return m_dataNotificationObject.id()
|
||||
|
||||
void ObjectNotification::onPublishData()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Publish NomNotification-data to dds notificationId:" << m_dataNotificationObject.id();
|
||||
INFO_LOG() << "Publish NomNotification-data to dds notificationId:" << m_dataNotificationObject.id();
|
||||
|
||||
if (!m_ddsHandler->dts()->publish(m_dataNotificationObject))
|
||||
WARNING_LOG(m_logger) << "Error publishing NomNotification-data to dds";
|
||||
WARNING_LOG() << "Error publishing NomNotification-data to dds";
|
||||
|
||||
} // end of onPublishData()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user