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
+29
-29
@@ -100,7 +100,7 @@ tgtTestShootbackTarget::~tgtTestShootbackTarget()
|
||||
|
||||
void tgtTestShootbackTarget::initTestCase()
|
||||
{
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " do testing with"
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " do testing with"
|
||||
<< " domainId=" << m_domainId
|
||||
<< " exerciseId=" << m_exerciseId;
|
||||
|
||||
@@ -128,7 +128,7 @@ void tgtTestShootbackTarget::initTestCase()
|
||||
removeTestObjects();
|
||||
|
||||
if (!bRet)
|
||||
FATAL_LOG(m_logger) << LOGFUNCTION << " init failed!!!";
|
||||
FATAL_LOG(m_logger) << Q_FUNC_INFO << " init failed!!!";
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ void tgtTestShootbackTarget::testShootbackArea()
|
||||
|
||||
// time to process reply
|
||||
QTest::qWait(100);
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId;
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId;
|
||||
|
||||
|
||||
// modify
|
||||
@@ -169,7 +169,7 @@ void tgtTestShootbackTarget::testShootbackArea()
|
||||
// verify mod
|
||||
{
|
||||
TargetManagement::ShootbackArea modData = m_dtcTgt->shootbackArea(m_replyShootbackAreaId);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "modData=" << modData;
|
||||
INFO_LOG() << Q_FUNC_INFO << "modData=" << modData;
|
||||
QVERIFY2((modData.id() == m_replyShootbackAreaId), " shootbackArea failed");
|
||||
QVERIFY2((modData.name().compare(request.name()) == 0), " verify name failed");
|
||||
}
|
||||
@@ -207,7 +207,7 @@ void tgtTestShootbackTarget::testShootbackTarget()
|
||||
|
||||
// time to process reply
|
||||
QTest::qWait(100);
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId;
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId;
|
||||
|
||||
|
||||
// modify
|
||||
@@ -220,13 +220,13 @@ void tgtTestShootbackTarget::testShootbackTarget()
|
||||
QSignalSpy spy(m_dtcTgt.get(), &TargetManagement::Interface::Dtc::shootbackTargetChanged);
|
||||
if (spy.count() == 0)
|
||||
spy.wait(2000);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "spy.count()=" << spy.count();
|
||||
INFO_LOG() << Q_FUNC_INFO << "spy.count()=" << spy.count();
|
||||
QVERIFY2((spy.count() == 1), " spy failed");
|
||||
|
||||
// verify mod
|
||||
{
|
||||
TargetManagement::ShootbackTarget modData = m_dtcTgt->shootbackTarget(m_replyShootbackTargetId);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "modData=" << modData;
|
||||
INFO_LOG() << Q_FUNC_INFO << "modData=" << modData;
|
||||
QVERIFY2((modData.id() == m_replyShootbackTargetId), " shootbackTarget failed");
|
||||
QVERIFY2((modData.name().compare(request.name()) == 0), " verify name failed");
|
||||
}
|
||||
@@ -268,7 +268,7 @@ void tgtTestShootbackTarget::testTargetAreaAssignment()
|
||||
QSignalSpy spy(m_dtcTgt.get(), &TargetManagement::Interface::Dtc::targetAreaAssignmentChanged);
|
||||
if (spy.count() == 0)
|
||||
spy.wait(2000);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "spy.count()=" << spy.count();
|
||||
INFO_LOG() << Q_FUNC_INFO << "spy.count()=" << spy.count();
|
||||
QVERIFY2((spy.count() == 1), " spy failed");
|
||||
|
||||
// time to process reply
|
||||
@@ -288,13 +288,13 @@ void tgtTestShootbackTarget::testTargetAreaAssignment()
|
||||
QSignalSpy spy(m_dtcTgt.get(), &TargetManagement::Interface::Dtc::targetAreaAssignmentChanged);
|
||||
if (spy.count() == 0)
|
||||
spy.wait(2000);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "spy.count()=" << spy.count();
|
||||
INFO_LOG() << Q_FUNC_INFO << "spy.count()=" << spy.count();
|
||||
QVERIFY2((spy.count() == 1), " spy failed");
|
||||
|
||||
// verify mod
|
||||
{
|
||||
TargetManagement::TargetAreaAssignment modData = m_dtcTgt->targetAreaAssignment(m_replyTargetAreaAssignmentId);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << "modData=" << modData;
|
||||
INFO_LOG() << Q_FUNC_INFO << "modData=" << modData;
|
||||
QVERIFY2((modData.id() == m_replyTargetAreaAssignmentId), " targetAreaAssignment failed");
|
||||
QVERIFY2((modData.name().compare(request.name()) == 0), " verify name failed");
|
||||
}
|
||||
@@ -321,38 +321,38 @@ void tgtTestShootbackTarget::removeTestObjects()
|
||||
// first, remove all TargetAreaAssignments:
|
||||
{
|
||||
QMap<qint32, TargetManagement::TargetAreaAssignment> allObj = m_dtcTgt->targetAreaAssignments();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " TargetAreaAssignments)";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove... (" << allObj.size() << " TargetAreaAssignments)";
|
||||
for (auto item: std::as_const(allObj))
|
||||
if (item.name().substr(0, 8).compare("UnitTest") == 0)
|
||||
removeAssignment(item.id());
|
||||
QTest::qWait(250); // time to process reply
|
||||
allObj = m_dtcTgt->targetAreaAssignments();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove targetAreaAssignments finished -> " << allObj.size() << " TargetAreaAssignments";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove targetAreaAssignments finished -> " << allObj.size() << " TargetAreaAssignments";
|
||||
}
|
||||
|
||||
// remove all Areas:
|
||||
{
|
||||
QMap<qint32, TargetManagement::ShootbackArea> allObj = m_dtcTgt->shootbackAreas();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " Areas)";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove... (" << allObj.size() << " Areas)";
|
||||
for (auto item: std::as_const(allObj))
|
||||
if (item.name().substr(0, 8).compare("UnitTest") == 0)
|
||||
removeArea(item.id());
|
||||
QTest::qWait(250); // time to process reply
|
||||
allObj = m_dtcTgt->shootbackAreas();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove shootbackAreas finished -> " << allObj.size() << " Areas";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove shootbackAreas finished -> " << allObj.size() << " Areas";
|
||||
}
|
||||
|
||||
// remove all Targets:
|
||||
{
|
||||
QMap<qint32, TargetManagement::ShootbackTarget> allObj = m_dtcTgt->shootbackTargets();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " Targets)";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove... (" << allObj.size() << " Targets)";
|
||||
for (auto item: std::as_const(allObj))
|
||||
if (item.name().substr(0, 8).compare("UnitTest") == 0)
|
||||
removeTarget(item.id());
|
||||
QTest::qWait(250); // time to process reply
|
||||
|
||||
allObj = m_dtcTgt->shootbackTargets();
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " remove shootbackTargets finished -> " << allObj.size() << " Targets";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove shootbackTargets finished -> " << allObj.size() << " Targets";
|
||||
}
|
||||
QTest::qWait(1000); // time to process
|
||||
}
|
||||
@@ -387,7 +387,7 @@ void tgtTestShootbackTarget::createArea(int &areaIdInOut, const QString &name, d
|
||||
|
||||
// time to process reply
|
||||
QTest::qWait(100);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId;
|
||||
INFO_LOG() << Q_FUNC_INFO << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId;
|
||||
|
||||
areaIdInOut = m_replyShootbackAreaId;
|
||||
}
|
||||
@@ -447,7 +447,7 @@ void tgtTestShootbackTarget::createTarget(int &targetIdOut, int targetParticipan
|
||||
|
||||
// time to process reply
|
||||
QTest::qWait(100);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId;
|
||||
INFO_LOG() << Q_FUNC_INFO << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId;
|
||||
|
||||
targetIdOut = m_replyShootbackTargetId;
|
||||
}
|
||||
@@ -515,7 +515,7 @@ void tgtTestShootbackTarget::createAssignment(int areaId, int targetParticipantI
|
||||
|
||||
// time to process reply
|
||||
QTest::qWait(100);
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " got m_replyTargetAreaAssignmentId: " << m_replyTargetAreaAssignmentId;
|
||||
INFO_LOG() << Q_FUNC_INFO << " got m_replyTargetAreaAssignmentId: " << m_replyTargetAreaAssignmentId;
|
||||
|
||||
assignmentIdOut = m_replyTargetAreaAssignmentId;
|
||||
}
|
||||
@@ -564,7 +564,7 @@ void tgtTestShootbackTarget::moveParticipant(int participantId, double lon, doub
|
||||
if (!m_dtsPpm)
|
||||
return;
|
||||
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " move Participant: id = " << participantId;
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " move Participant: id = " << participantId;
|
||||
ParticipantManagement::ParticipantPosition posReq;
|
||||
posReq.participantId(participantId);
|
||||
posReq.sampleTime(currentSampleTime());
|
||||
@@ -572,7 +572,7 @@ void tgtTestShootbackTarget::moveParticipant(int participantId, double lon, doub
|
||||
posReq.partyId(2); // 0 and 1 will be skipped
|
||||
if (!m_dtsPpm->publish(posReq))
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Error publish posReq";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Error publish posReq";
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -727,7 +727,7 @@ void tgtTestShootbackTarget::testPlayerMovesLos()
|
||||
|
||||
// move assigned target 1 slightly:
|
||||
{
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " move target1 ...";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " move target1 ...";
|
||||
modifyTarget(m_targetDataId1, g_targetParticipantId_1, QStringLiteral("UnitTest-TargetDataId1_Moved"), 0.149, 0.926, 55.0);
|
||||
|
||||
QTest::qWait(250); // time to process
|
||||
@@ -736,7 +736,7 @@ void tgtTestShootbackTarget::testPlayerMovesLos()
|
||||
|
||||
// move (z) assigned target 1 to interrupt line of sight:
|
||||
{
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " move target1 ...";
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " move target1 ...";
|
||||
modifyTarget(m_targetDataId1, g_targetParticipantId_1, QStringLiteral("UnitTest-TargetDataId1_Moved"), 0.152, 0.926, 2.0);
|
||||
|
||||
QTest::qWait(250); // time to process
|
||||
@@ -878,7 +878,7 @@ void tgtTestShootbackTarget::onShootbackAreaModifyReply(const Core::FunctionRepl
|
||||
m_replyShootbackAreaId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
m_replyShootbackAreaId = -1;
|
||||
}
|
||||
}
|
||||
@@ -888,7 +888,7 @@ void tgtTestShootbackTarget::onShootbackAreaRemoveReply(const Core::FunctionRepl
|
||||
m_replyShootbackAreaId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
<< ", id="<< reply.id();
|
||||
m_replyShootbackAreaId = -1;
|
||||
}
|
||||
@@ -901,7 +901,7 @@ void tgtTestShootbackTarget::onShootbackTargetModifyReply(const Core::FunctionRe
|
||||
m_replyShootbackTargetId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
m_replyShootbackTargetId = -1;
|
||||
}
|
||||
}
|
||||
@@ -911,7 +911,7 @@ void tgtTestShootbackTarget::onShootbackTargetRemoveReply(const Core::FunctionRe
|
||||
m_replyShootbackTargetId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
<< ", id="<< reply.id();
|
||||
m_replyShootbackTargetId = -1;
|
||||
}
|
||||
@@ -924,7 +924,7 @@ void tgtTestShootbackTarget::onTargetAreaAssignmentModifyReply(const Core::Funct
|
||||
m_replyTargetAreaAssignmentId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'";
|
||||
m_replyTargetAreaAssignmentId = -1;
|
||||
}
|
||||
}
|
||||
@@ -934,7 +934,7 @@ void tgtTestShootbackTarget::onTargetAreaAssignmentRemoveReply(const Core::Funct
|
||||
m_replyTargetAreaAssignmentId = reply.id();
|
||||
if (reply.error())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
ERROR_LOG() << "Error onShootbackAreaRemoveReply - aborting: '" << reply.str() << "'"
|
||||
<< ", id="<< reply.id();
|
||||
m_replyTargetAreaAssignmentId = -1;
|
||||
}
|
||||
|
||||
-3
@@ -124,8 +124,5 @@ private:
|
||||
int m_replyShootbackAreaId = -1;
|
||||
int m_replyShootbackTargetId = -1;
|
||||
int m_replyTargetAreaAssignmentId = -1;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
} // namespace
|
||||
Reference in new issue
Block a user