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
+20
-21
@@ -11,7 +11,7 @@
|
||||
#include "handler_operator.h"
|
||||
#include <DDS/FTS/generic_fts_impl.h>
|
||||
#include <DDS/DTS/generic_dts_impl.h>
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <DDS/Core/core_types.h>
|
||||
|
||||
#include <QMutableHashIterator>
|
||||
|
||||
@@ -22,7 +22,6 @@ HandlerLockedTopics::HandlerLockedTopics(MainHandler &mainHandler,
|
||||
QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerLockedTopics"))
|
||||
{}
|
||||
|
||||
bool HandlerLockedTopics::init()
|
||||
@@ -54,7 +53,7 @@ bool HandlerLockedTopics::init()
|
||||
|
||||
auto cbDatabase = [this](const Database::OpmLockedTopics & data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Locked topic from db: " << data.exerciseId.toInt() << ", " << data.workstationId
|
||||
DEBUG_LOG() << "Locked topic from db: " << data.exerciseId.toInt() << ", " << data.workstationId
|
||||
<< ", " << data.operatorId << data.entityTypeName;
|
||||
m_lockedTopics.insert(Core::key(data.entityId, data.exerciseId.isNull() ? 0 : data.exerciseId.toInt(), data.entityTypeName), data);
|
||||
};
|
||||
@@ -90,7 +89,7 @@ void HandlerLockedTopics::operatorLoggedInOut(int operatorId, int workstationId)
|
||||
{
|
||||
// check if there are stale locks (e.g. by crashing client) - then remove all of them - if there are any
|
||||
|
||||
DEBUG_LOG(m_logger) << "operatorLoggedInOut: " << workstationId << ", " << operatorId;
|
||||
DEBUG_LOG() << "operatorLoggedInOut: " << workstationId << ", " << operatorId;
|
||||
|
||||
// Ueberall wurden - ohne erase wohlgemerkt - mutable Iteratoren verwendet. Nur hier - wo erase verwendet wurde - nicht! :')
|
||||
QMutableHashIterator<Core::key, Database::OpmLockedTopics> it(m_lockedTopics);
|
||||
@@ -99,7 +98,7 @@ void HandlerLockedTopics::operatorLoggedInOut(int operatorId, int workstationId)
|
||||
{
|
||||
const auto lockedTopic = it.next().value();
|
||||
|
||||
DEBUG_LOG(m_logger) << "check if unlock: id=" << lockedTopic.id
|
||||
DEBUG_LOG() << "check if unlock: id=" << lockedTopic.id
|
||||
<< ", exId=" << lockedTopic.exerciseId.toInt()
|
||||
<< ", wsId=" << lockedTopic.workstationId
|
||||
<< ", opId=" << lockedTopic.operatorId;
|
||||
@@ -108,7 +107,7 @@ void HandlerLockedTopics::operatorLoggedInOut(int operatorId, int workstationId)
|
||||
continue;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Unlocking topic: id=" << lockedTopic.id
|
||||
DEBUG_LOG() << "Unlocking topic: id=" << lockedTopic.id
|
||||
<< ", exId=" << lockedTopic.exerciseId.toInt()
|
||||
<< ", wsId=" << lockedTopic.workstationId
|
||||
<< ", opId=" << lockedTopic.operatorId;
|
||||
@@ -127,11 +126,11 @@ void HandlerLockedTopics::onTryLockEntityRequest(const rti::core::SampleIdentity
|
||||
auto ret = tryLock(request);
|
||||
if (!ret.errorString().empty())
|
||||
{
|
||||
WARNING_LOG(m_logger) << Core::FunctionReplyObject(ret.FunctionReply::id(), ret.errorString(), ret.errorParams()).translated() << " - " << request;
|
||||
WARNING_LOG() << Core::FunctionReplyObject(ret.FunctionReply::id(), ret.errorString(), ret.errorParams()).translated() << " - " << request;
|
||||
}
|
||||
else if (ret.alreadyLocked())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "onTryLockEntityRequest failed because the topic was already locked by ws " << ret.alreadyLocked().get().workstationName() << " and op " << ret.alreadyLocked().get().operatorName() << " - " << request;
|
||||
WARNING_LOG() << "onTryLockEntityRequest failed because the topic was already locked by ws " << ret.alreadyLocked().get().workstationName() << " and op " << ret.alreadyLocked().get().operatorName() << " - " << request;
|
||||
}
|
||||
m_ftsTryLockEntity->sendReply(cookie, ret);
|
||||
|
||||
@@ -156,7 +155,7 @@ Core::TryLockEntityReply lockSuccessReply(const Database::OpmLockedTopics &dbStr
|
||||
|
||||
Core::TryLockEntityReply HandlerLockedTopics::tryLock(const Core::TryLockEntityRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "tryLock : " << request;
|
||||
DEBUG_LOG() << "tryLock : " << request;
|
||||
|
||||
const auto topicId = request.entityId();
|
||||
|
||||
@@ -192,7 +191,7 @@ Core::TryLockEntityReply HandlerLockedTopics::tryLock(const Core::TryLockEntityR
|
||||
|
||||
//Core::TryLockEntityReply HandlerLockedTopics::tryLockModify(const Core::TryLockEntityRequest &request)
|
||||
//{
|
||||
// DEBUG_LOG(m_logger) << "tryLockModify: " << request;
|
||||
// DEBUG_LOG() << "tryLockModify: " << request;
|
||||
|
||||
// const auto lockEntityId = request.id();
|
||||
|
||||
@@ -261,7 +260,7 @@ Core::TryLockEntityReply HandlerLockedTopics::tryLock(const Core::TryLockEntityR
|
||||
// }
|
||||
|
||||
// const Database::OpmLockedTopics &lockedTopic = *lockedTopicIt;
|
||||
// DEBUG_LOG(m_logger) << LOGFUNCTION << ": locked topic id " << lockedTopic.id;
|
||||
// DEBUG_LOG() << Q_FUNC_INFO << ": locked topic id " << lockedTopic.id;
|
||||
// // ... and then reinserting the updated lock entity (as the id has now changed) - while the key (op, ws, exc, topic id) stays the same!
|
||||
// m_lockedTopics[requestedKey] = dbStruct;
|
||||
// }
|
||||
@@ -271,7 +270,7 @@ Core::TryLockEntityReply HandlerLockedTopics::tryLock(const Core::TryLockEntityR
|
||||
|
||||
//bool HandlerLockedTopics::removeReleaseOutdatedLock(const int lockEntityId)
|
||||
//{
|
||||
// DEBUG_LOG(m_logger) << "removeReleaseOutdatedLock: lockEntityId = " << lockEntityId;
|
||||
// DEBUG_LOG() << "removeReleaseOutdatedLock: lockEntityId = " << lockEntityId;
|
||||
|
||||
// auto lockedTopicIt = std::find_if(m_lockedTopics.constBegin(), m_lockedTopics.constEnd(),
|
||||
// [&lockEntityId](const Database::OpmLockedTopics &lockedTopic)
|
||||
@@ -281,13 +280,13 @@ Core::TryLockEntityReply HandlerLockedTopics::tryLock(const Core::TryLockEntityR
|
||||
|
||||
// if (lockedTopicIt == m_lockedTopics.constEnd())
|
||||
// {
|
||||
// ERROR_LOG(m_logger) << LOGFUNCTION << ": Failed to release outdated lock as lock entity id ("<<lockedTopicIt<<") was not found!";
|
||||
// ERROR_LOG() << Q_FUNC_INFO << ": Failed to release outdated lock as lock entity id ("<<lockedTopicIt<<") was not found!";
|
||||
// Q_ASSERT(false);
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// const Database::OpmLockedTopics &lockedTopic = *lockedTopicIt;
|
||||
// DEBUG_LOG(m_logger) << LOGFUNCTION << ": found lock entity " << lockEntityId;
|
||||
// DEBUG_LOG() << Q_FUNC_INFO << ": found lock entity " << lockEntityId;
|
||||
|
||||
// unlockInDb(lockedTopic);
|
||||
// removeLockedEntity(lockEntityId);
|
||||
@@ -306,7 +305,7 @@ void HandlerLockedTopics::onTryUnlockEntityRequest(const rti::core::SampleIdenti
|
||||
auto ret = tryUnlock(request);
|
||||
if (!ret.errorString().empty())
|
||||
{
|
||||
WARNING_LOG(m_logger) << Core::FunctionReplyObject(ret.FunctionReply::id(), ret.errorString(), ret.errorParams()).translated() << " - " << request;
|
||||
WARNING_LOG() << Core::FunctionReplyObject(ret.FunctionReply::id(), ret.errorString(), ret.errorParams()).translated() << " - " << request;
|
||||
}
|
||||
m_ftsTryUnlockEntity->sendReply(cookie, ret);
|
||||
|
||||
@@ -316,7 +315,7 @@ void HandlerLockedTopics::onTryUnlockEntityRequest(const rti::core::SampleIdenti
|
||||
|
||||
Core::FunctionReply HandlerLockedTopics::tryUnlock(const Core::TryUnlockEntityRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "tryUnlock: " << request;
|
||||
DEBUG_LOG() << "tryUnlock: " << request;
|
||||
|
||||
const auto lockEntityId = request.id();
|
||||
|
||||
@@ -367,7 +366,7 @@ bool HandlerLockedTopics::publishLockedEntity(const Core::LockedEntity &entity)
|
||||
m_dtsLockedEntity->write(entity);
|
||||
return true;
|
||||
}
|
||||
ERROR_LOG(m_logger) << "Publishing LockedEntity " << entity.id() << " failed: DTS not available!";
|
||||
ERROR_LOG() << "Publishing LockedEntity " << entity.id() << " failed: DTS not available!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -380,7 +379,7 @@ bool HandlerLockedTopics::removeLockedEntity(int64_t id)
|
||||
m_dtsLockedEntity->remove(entity);
|
||||
return true;
|
||||
}
|
||||
ERROR_LOG(m_logger) << "Removing LockedEntity " << entity.id() << " failed: DTS not available!";
|
||||
ERROR_LOG() << "Removing LockedEntity " << entity.id() << " failed: DTS not available!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -405,14 +404,14 @@ void HandlerLockedTopics::dumpLockedTopics(int line)
|
||||
{
|
||||
QHashIterator<Core::key, Database::OpmLockedTopics> it (m_lockedTopics);
|
||||
|
||||
INFO_LOG(m_logger) << " dump m_lockedTopics, START size= " << m_lockedTopics.size()
|
||||
INFO_LOG() << " dump m_lockedTopics, START size= " << m_lockedTopics.size()
|
||||
<< " (callerline=" << line << ")";
|
||||
while (it.hasNext())
|
||||
{
|
||||
it.next();
|
||||
const Core::key &keyRef = it.key();
|
||||
const Database::OpmLockedTopics &valRef = it.value();
|
||||
INFO_LOG(m_logger) << " entityTypeName=" << keyRef.entityTypeName << "'"
|
||||
INFO_LOG() << " entityTypeName=" << keyRef.entityTypeName << "'"
|
||||
<< ", entityId=" << keyRef.entityId
|
||||
<< ", exerciseId=" << keyRef.exerciseId
|
||||
<< " - eTN=" << valRef.entityTypeName
|
||||
@@ -420,7 +419,7 @@ void HandlerLockedTopics::dumpLockedTopics(int line)
|
||||
<< ", exId=" << valRef.exerciseId.toInt()
|
||||
<< ", opId=" << valRef.operatorId;
|
||||
}
|
||||
INFO_LOG(m_logger) << " dump m_lockedTopics, END size= " << m_lockedTopics.size();
|
||||
INFO_LOG() << " dump m_lockedTopics, END size= " << m_lockedTopics.size();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
Reference in new issue
Block a user