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
+28
-29
@@ -32,7 +32,6 @@ HandlerOperator::HandlerOperator(MainHandler *mainHandler)
|
||||
, Interface::Fts::OperatorUpdateVisiblePartiesByExerciseRequestHandler(mainHandler->fts())
|
||||
, m_aliveCheckTimer(new QTimer(this))
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerOperator"))
|
||||
{
|
||||
connect(m_aliveCheckTimer, &QTimer::timeout, this, &HandlerOperator::onCheckAliveTimeout);
|
||||
m_aliveCheckTimer->setInterval(10000);
|
||||
@@ -54,7 +53,7 @@ bool HandlerOperator::init()
|
||||
// read all Operators from database
|
||||
if (!m_mainHandler->db()->select(dataVec))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -62,17 +61,17 @@ bool HandlerOperator::init()
|
||||
// read all Operators from database
|
||||
if (!m_mainHandler->db()->select(partyExerciseVec))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error reading data from database!";
|
||||
ERROR_LOG() << "Error reading data from database!";
|
||||
return true;
|
||||
}
|
||||
QMap<int, QVector<Database::OpmOperatorExercise> > opMap;
|
||||
for (const auto &elem : partyExerciseVec)
|
||||
{
|
||||
INFO_LOG(m_logger) << "---------- elem.operatorId:" << elem.operatorId
|
||||
INFO_LOG() << "---------- elem.operatorId:" << elem.operatorId
|
||||
<< ", elem size " << elem.visibleParties().size();
|
||||
opMap[elem.operatorId] << elem;
|
||||
}
|
||||
INFO_LOG(m_logger) << "------- opMap size" << opMap.size();
|
||||
INFO_LOG() << "------- opMap size" << opMap.size();
|
||||
|
||||
OperatorManagement::OperatorWorkstationAlive alive;
|
||||
alive.lastAlive(QDateTime::currentMSecsSinceEpoch());
|
||||
@@ -83,7 +82,7 @@ bool HandlerOperator::init()
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
return false;
|
||||
}
|
||||
if (m_logger.isDebugEnabled())
|
||||
@@ -93,7 +92,7 @@ bool HandlerOperator::init()
|
||||
stringList.reserve(acls.size());
|
||||
for (int acl : acls)
|
||||
stringList << QString::number(acl);
|
||||
DEBUG_LOG(m_logger) << "Effective ACLs for Operator " << op.name << "(id: " << op.id << "): "
|
||||
DEBUG_LOG() << "Effective ACLs for Operator " << op.name << "(id: " << op.id << "): "
|
||||
<< stringList.join(QLatin1String(", "));
|
||||
}
|
||||
ifs->updateExercises(getExercisesForOperator(exMappingVec, op.id), true);
|
||||
@@ -111,7 +110,7 @@ bool HandlerOperator::init()
|
||||
this, &HandlerOperator::onOperatorWorkstationAliveChanged);
|
||||
dtc->enableOperatorWorkstationAlive();
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_exeObjMap.size() = " << m_operatorObjMap.size();
|
||||
DEBUG_LOG() << "m_exeObjMap.size() = " << m_operatorObjMap.size();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -139,7 +138,7 @@ std::vector<int> HandlerOperator::getExercisesForOperator(const QVector<Database
|
||||
void HandlerOperator::onOperatorChangePasswordRequest(const rti::core::SampleIdentity &cookie,
|
||||
const OperatorChangePasswordRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onOperatorChangePasswordRequest()";
|
||||
DEBUG_LOG() << "onOperatorChangePasswordRequest()";
|
||||
ObjectOperator *ifs = m_operatorObjMap.value(request.id());
|
||||
if (!ifs)
|
||||
{
|
||||
@@ -185,14 +184,14 @@ void HandlerOperator::onOperatorCreateModifyRequest(const rti::core::SampleIdent
|
||||
const OperatorCreateModifyRequest &request)
|
||||
{
|
||||
Core::FunctionReplyObject ret;
|
||||
DEBUG_LOG(m_logger) << "onOperatorCreateModifyRequest()";
|
||||
DEBUG_LOG() << "onOperatorCreateModifyRequest()";
|
||||
if (!request.id().is_set())
|
||||
ret = operatorCreateRequest(request);
|
||||
else
|
||||
ret = operatorModifyRequest(request);
|
||||
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
m_mainHandler->fts()->operatorCreateModifyReply(cookie, ret);
|
||||
}
|
||||
|
||||
@@ -269,13 +268,13 @@ Core::FunctionReplyObject HandlerOperator::operatorCreateRequest(const OperatorC
|
||||
|
||||
void HandlerOperator::operatorModifyRolePresetId( int operatorId, int rolePresetId)
|
||||
{
|
||||
DEBUG_LOG(m_logger)<< "HandlerOperator::operatorModifyRolePresetId"
|
||||
DEBUG_LOG()<< "HandlerOperator::operatorModifyRolePresetId"
|
||||
<< " operatorId=" << operatorId
|
||||
<< " rolePresetId=" << rolePresetId;
|
||||
ObjectOperator *ifs = m_operatorObjMap.value(operatorId);
|
||||
if (!ifs)
|
||||
{
|
||||
ERROR_LOG(m_logger)<< "No valid operator id given: "<< operatorId;
|
||||
ERROR_LOG()<< "No valid operator id given: "<< operatorId;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -342,7 +341,7 @@ Core::FunctionReplyObject HandlerOperator::operatorModifyRequest(const OperatorC
|
||||
void HandlerOperator::onOperatorRemoveRequest(const rti::core::SampleIdentity &cookie,
|
||||
const Core::RemoveElementRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onOperatorRemoveRequest()" << request;
|
||||
DEBUG_LOG() << "onOperatorRemoveRequest()" << request;
|
||||
|
||||
ObjectOperator *ifs = m_operatorObjMap.value(request.id());
|
||||
if (!ifs)
|
||||
@@ -373,7 +372,7 @@ void HandlerOperator::onOperatorRemoveRequest(const rti::core::SampleIdentity &c
|
||||
Core::FunctionReplyObject ret = m_mainHandler->getHandlerGroup()->remove(groupRemoveRequest);
|
||||
if (ret.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << ret();
|
||||
ERROR_LOG() << ret();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -390,7 +389,7 @@ void HandlerOperator::onOperatorRemoveRequest(const rti::core::SampleIdentity &c
|
||||
void HandlerOperator::onOperatorLoginRequest(const rti::core::SampleIdentity &cookie,
|
||||
const OperatorLoginRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "OperatorLoginRequest: " << request;
|
||||
DEBUG_LOG() << "OperatorLoginRequest: " << request;
|
||||
|
||||
ObjectOperator *ifs = m_operatorObjMap.value(request.id());
|
||||
if (!ifs)
|
||||
@@ -461,7 +460,7 @@ void HandlerOperator::onOperatorLoginRequest(const rti::core::SampleIdentity &co
|
||||
OperatorLogoutRequest req;
|
||||
req.id(otherOperatorId);
|
||||
onOperatorLogoutRequest(cookie, req);
|
||||
WARNING_LOG(m_logger) << "Logged out operator " << otherOperatorId << " on workstation id " << request.workstationId();
|
||||
WARNING_LOG() << "Logged out operator " << otherOperatorId << " on workstation id " << request.workstationId();
|
||||
}
|
||||
}
|
||||
// Claim WS:
|
||||
@@ -472,7 +471,7 @@ void HandlerOperator::onOperatorLoginRequest(const rti::core::SampleIdentity &co
|
||||
}
|
||||
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
WARNING_LOG() << ret();
|
||||
else
|
||||
{
|
||||
m_mainHandler->getHandlerLockedTopics()->operatorLoggedIn(request.id(), request.workstationId());
|
||||
@@ -492,7 +491,7 @@ int HandlerOperator::getLoggedOperatorId(int workstationId) const
|
||||
void HandlerOperator::onOperatorLogoutRequest(const rti::core::SampleIdentity &cookie,
|
||||
const OperatorLogoutRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "OperatorLogoutRequest: " << request;
|
||||
DEBUG_LOG() << "OperatorLogoutRequest: " << request;
|
||||
|
||||
ObjectOperator *ifs = m_operatorObjMap.value(request.id());
|
||||
if (!ifs)
|
||||
@@ -567,10 +566,10 @@ void HandlerOperator::onOperatorGetSetSettingsRequest(const rti::core::SampleIde
|
||||
|
||||
void HandlerOperator::onOperatorApplyForeignAclsRequest(const rti::core::SampleIdentity &cookie, const OperatorApplyForeignAclsRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "peratorApplyForeignAclsRequest: " << request;
|
||||
DEBUG_LOG() << "peratorApplyForeignAclsRequest: " << request;
|
||||
auto reply = operatorApplyForeignAclsRequest(request);
|
||||
if (reply.error())
|
||||
WARNING_LOG(m_logger) << reply();
|
||||
WARNING_LOG() << reply();
|
||||
m_mainHandler->fts()->operatorApplyForeignAclsReply(cookie, reply);
|
||||
}
|
||||
|
||||
@@ -590,11 +589,11 @@ Core::FunctionReplyObject HandlerOperator::operatorApplyForeignAclsRequest(const
|
||||
void HandlerOperator::onOperatorUpdateVisiblePartiesByExerciseRequest(const rti::core::SampleIdentity &cookie,
|
||||
const OperatorUpdateVisiblePartiesByExerciseRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << request;
|
||||
// DEBUG_LOG(m_logger) << "onOperatorUpdateVisiblePartiesByExerciseRequest: " << request;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << request;
|
||||
// DEBUG_LOG() << "onOperatorUpdateVisiblePartiesByExerciseRequest: " << request;
|
||||
Core::FunctionReplyObject reply = operatorUpdateVisiblePartiesByExerciseRequest(request);
|
||||
if (reply.error())
|
||||
WARNING_LOG(m_logger) << reply();
|
||||
WARNING_LOG() << reply();
|
||||
m_mainHandler->fts()->operatorUpdateVisiblePartiesByExerciseReply(cookie, reply);
|
||||
}
|
||||
|
||||
@@ -626,7 +625,7 @@ void HandlerOperator::reloadAcls()
|
||||
|
||||
void HandlerOperator::onOperatorWorkstationAliveChanged(const OperatorManagement::OperatorWorkstationAlive &data, DataModification modType)
|
||||
{
|
||||
INFO_LOG(m_logger) << "onOperatorWorkstationAliveChanged: " << data << ", " << modType;
|
||||
INFO_LOG() << "onOperatorWorkstationAliveChanged: " << data << ", " << modType;
|
||||
if (data.operatorId() < 0)
|
||||
{
|
||||
m_aliveData.remove(data.workstationId());
|
||||
@@ -646,11 +645,11 @@ void HandlerOperator::onCheckAliveTimeout()
|
||||
return;
|
||||
|
||||
const qint64 tTimeoutTime = QDateTime::currentMSecsSinceEpoch() - 90 * 1000; // 90s
|
||||
DEBUG_LOG(m_logger) << "onCheckAliveTimeout, timeoutTime: " << tTimeoutTime;
|
||||
DEBUG_LOG() << "onCheckAliveTimeout, timeoutTime: " << tTimeoutTime;
|
||||
auto it = m_aliveData.begin();
|
||||
while (it != m_aliveData.end())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Checking alive for workstation " << it.key();
|
||||
DEBUG_LOG() << "Checking alive for workstation " << it.key();
|
||||
auto &events = it.value();
|
||||
if (events.isEmpty() || events.last().lastAlive() >= tTimeoutTime)
|
||||
{
|
||||
@@ -660,12 +659,12 @@ void HandlerOperator::onCheckAliveTimeout()
|
||||
// no reference, will be a dangling one after m_aliveData.erase(it) !
|
||||
const OperatorWorkstationAlive owa = events.last();
|
||||
|
||||
WARNING_LOG(m_logger) << "Timeout for workstation " << owa.workstationId()
|
||||
WARNING_LOG() << "Timeout for workstation " << owa.workstationId()
|
||||
<< " and operator " << owa.operatorId() << " - logging out";
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
for (const auto &event : events)
|
||||
DEBUG_LOG(m_logger) << "Alive history: " << event;
|
||||
DEBUG_LOG() << "Alive history: " << event;
|
||||
}
|
||||
ObjectOperator *ifs = m_operatorObjMap.value(owa.operatorId());
|
||||
it = m_aliveData.erase(it);
|
||||
|
||||
Reference in new issue
Block a user