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
+10
-10
@@ -54,11 +54,11 @@ bool ConvertMineArea::init(int exerciseId)
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error opening db, exiting..";
|
||||
ERROR_LOG() << "Error opening db, exiting..";
|
||||
return false;
|
||||
}
|
||||
|
||||
ERROR_LOG(m_logger) << "Database open";
|
||||
ERROR_LOG() << "Database open";
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -81,15 +81,15 @@ bool ConvertMineArea::initDBInternal()
|
||||
QSqlDriver *driver = m_dbConnection.driver();
|
||||
if (!driver)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No SQL driver loaded - no database available!";
|
||||
WARNING_LOG() << "No SQL driver loaded - no database available!";
|
||||
return false;
|
||||
}
|
||||
const QString driverName = m_dbConnection.driverName();
|
||||
DEBUG_LOG(m_logger) << "Connected to database " << m_dbConnection.databaseName() << "@" << m_dbConnection.hostName()
|
||||
DEBUG_LOG() << "Connected to database " << m_dbConnection.databaseName() << "@" << m_dbConnection.hostName()
|
||||
<< ", schema: " << schemaName() << ", used driver: " << driverName;
|
||||
if (!m_dbConnection.isOpen())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Database connection is no open - can not initialize database interface";
|
||||
WARNING_LOG() << "Database connection is no open - can not initialize database interface";
|
||||
return false;
|
||||
}
|
||||
if (driverName == QLatin1String("QSQLITE"))
|
||||
@@ -189,9 +189,9 @@ bool ConvertMineArea::tryConvertMineArea()
|
||||
|
||||
data.endPosition = endPositionUtm.geographic();
|
||||
|
||||
DEBUG_LOG(m_logger) << "aesId: " << data.mineAreaId << ", id: " << data.id;
|
||||
DEBUG_LOG(m_logger) << "EndpositionUtm: x: " << endPositionUtm.x << ", y: " << endPositionUtm.y;
|
||||
DEBUG_LOG(m_logger) << "Geographic: x: " << data.endPosition.x() << " y: " << data.endPosition.y();
|
||||
DEBUG_LOG() << "aesId: " << data.mineAreaId << ", id: " << data.id;
|
||||
DEBUG_LOG() << "EndpositionUtm: x: " << endPositionUtm.x << ", y: " << endPositionUtm.y;
|
||||
DEBUG_LOG() << "Geographic: x: " << data.endPosition.x() << " y: " << data.endPosition.y();
|
||||
|
||||
vecMineArea.append(data);
|
||||
}
|
||||
@@ -204,7 +204,7 @@ bool ConvertMineArea::tryConvertMineArea()
|
||||
if (!m_query->prepare(stmt3))
|
||||
{
|
||||
m_lastError = m_query->lastError();
|
||||
ERROR_LOG(m_logger) << "lastError: " << m_lastError.text();
|
||||
ERROR_LOG() << "lastError: " << m_lastError.text();
|
||||
return false;
|
||||
}
|
||||
for ( const Database::AesMineAreaSegment &mineAreaSegment : vecMineArea)
|
||||
@@ -216,7 +216,7 @@ bool ConvertMineArea::tryConvertMineArea()
|
||||
if (!m_query->exec(m_bEmitMessageOnError))
|
||||
{
|
||||
m_lastError = m_query->lastError();
|
||||
ERROR_LOG(m_logger) << "lastError: " << m_lastError.text();
|
||||
ERROR_LOG() << "lastError: " << m_lastError.text();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
-4
@@ -54,10 +54,6 @@ private:
|
||||
bool m_bEmitMessageOnError;
|
||||
bool m_bCanHandleSchemas;
|
||||
bool m_ownDatabaseConnection;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace AreaEffectSimulation
|
||||
+18
-18
@@ -29,7 +29,7 @@ TestBase::TestBase(const char *loggerName, QObject *parent)
|
||||
|
||||
bool TestBase::init(int domainId, int exerciseId, int testId)
|
||||
{
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
INFO_LOG() << "init begin";
|
||||
m_testId = testId;
|
||||
|
||||
// initialize DDS
|
||||
@@ -38,15 +38,15 @@ bool TestBase::init(int domainId, int exerciseId, int testId)
|
||||
return false;
|
||||
m_ddsConnector->initPublisherSubscriber();
|
||||
|
||||
INFO_LOG(m_logger) << "init create ftc";
|
||||
INFO_LOG() << "init create ftc";
|
||||
m_ftc = AreaEffectSimulation::Interface::Ftc::create(m_ddsConnector);
|
||||
INFO_LOG(m_logger) << "init init ftc";
|
||||
INFO_LOG() << "init init ftc";
|
||||
bool bRet = m_ftc->enableAll();
|
||||
|
||||
m_dtc = AreaEffectSimulation::Interface::Dtc::create(m_ddsConnector);
|
||||
bRet = bRet && m_dtc->enableAll();
|
||||
|
||||
INFO_LOG(m_logger) << "init end - bRet = " << bRet;
|
||||
INFO_LOG() << "init end - bRet = " << bRet;
|
||||
return bRet;
|
||||
}
|
||||
|
||||
@@ -67,27 +67,27 @@ bool TestBase::checkAesItem(const AreaEffectSimulation::AesItem &a,
|
||||
{
|
||||
if (a.name() != b.name())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "name does not match: " << a.name() << " - " << b.name();
|
||||
WARNING_LOG() << "name does not match: " << a.name() << " - " << b.name();
|
||||
return false;
|
||||
}
|
||||
if (a.effectStart() != b.effectStart())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "effectStart does not match: " << a.effectStart() << " - " << b.effectStart();
|
||||
WARNING_LOG() << "effectStart does not match: " << a.effectStart() << " - " << b.effectStart();
|
||||
return false;
|
||||
}
|
||||
if (a.chargeStruct().chargeTypeId() != b.chargeStruct().chargeTypeId())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "chargeTypeId does not match: " << a.chargeStruct().chargeTypeId() << " - " << b.chargeStruct().chargeTypeId();
|
||||
WARNING_LOG() << "chargeTypeId does not match: " << a.chargeStruct().chargeTypeId() << " - " << b.chargeStruct().chargeTypeId();
|
||||
return false;
|
||||
}
|
||||
if (a.partyId() != b.partyId())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "partyId does not match: " << a.partyId() << " - " << b.partyId();
|
||||
WARNING_LOG() << "partyId does not match: " << a.partyId() << " - " << b.partyId();
|
||||
return false;
|
||||
}
|
||||
if (a.participantId() != b.participantId())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "participantId does not match: " << a.participantId() << " - " << b.participantId();
|
||||
WARNING_LOG() << "participantId does not match: " << a.participantId() << " - " << b.participantId();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -95,19 +95,19 @@ bool TestBase::checkAesItem(const AreaEffectSimulation::AesItem &a,
|
||||
|
||||
void TestBase::failExit()
|
||||
{
|
||||
ERROR_LOG(m_logger) << "fail exit!";
|
||||
ERROR_LOG() << "fail exit!";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
void TestBase::onAesCreateReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Got create " << m_aesTypeName << " reply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got create " << m_aesTypeName << " reply with id " << replyObject.id()
|
||||
<< ", error = " << replyObject.error()
|
||||
<< " and errorString = '" << replyObject.translated() << "'";
|
||||
m_replyError = replyObject.error();
|
||||
if (m_replyError && !m_bExpectedFailure)
|
||||
ERROR_LOG(m_logger) << "Got create " << m_aesTypeName << " reply error: " << replyObject();
|
||||
ERROR_LOG() << "Got create " << m_aesTypeName << " reply error: " << replyObject();
|
||||
else
|
||||
m_expectedAesId = replyObject.id(); // only works as expected because reply is sent before publishing data occours
|
||||
}
|
||||
@@ -116,34 +116,34 @@ void TestBase::onAesModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (m_expectedAesId != replyObject.id())
|
||||
return;
|
||||
INFO_LOG(m_logger) << "Got modify " << m_aesTypeName << " reply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got modify " << m_aesTypeName << " reply with id " << replyObject.id()
|
||||
<< ", error = " << replyObject.error()
|
||||
<< " and errorString = '" << replyObject.translated() << "'";
|
||||
m_replyError = replyObject.error();
|
||||
if (m_replyError && !m_bExpectedFailure)
|
||||
ERROR_LOG(m_logger) << "Got modify " << m_aesTypeName << " reply error: " << replyObject();
|
||||
ERROR_LOG() << "Got modify " << m_aesTypeName << " reply error: " << replyObject();
|
||||
else
|
||||
m_expectedAesId = replyObject.id();
|
||||
}
|
||||
|
||||
void TestBase::onAesRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Got remove " << m_aesTypeName << " reply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got remove " << m_aesTypeName << " reply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
m_replyError = replyObject.error();
|
||||
if (m_replyError && !m_bExpectedFailure)
|
||||
ERROR_LOG(m_logger) << "Got remove " << m_aesTypeName << " reply error: " << replyObject();
|
||||
ERROR_LOG() << "Got remove " << m_aesTypeName << " reply error: " << replyObject();
|
||||
else
|
||||
m_expectedAesId = replyObject.id();
|
||||
}
|
||||
|
||||
void TestBase::onAesTriggerReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Got trigger " << m_aesTypeName << " reply with id " << replyObject.id()
|
||||
INFO_LOG() << "Got trigger " << m_aesTypeName << " reply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
m_replyError = replyObject.error();
|
||||
if (m_replyError && !m_bExpectedFailure)
|
||||
ERROR_LOG(m_logger) << "Got remove " << m_aesTypeName << " reply error: " << replyObject();
|
||||
ERROR_LOG() << "Got remove " << m_aesTypeName << " reply error: " << replyObject();
|
||||
else
|
||||
m_expectedAesId = replyObject.id();
|
||||
}
|
||||
|
||||
+4
-6
@@ -14,7 +14,7 @@
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
#include <memory>
|
||||
|
||||
#include <AreaEffectSimulation/aes_test_base_export.h>
|
||||
#include "aes_test_base_export.h"
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
@@ -46,17 +46,17 @@ protected:
|
||||
template <typename T>
|
||||
void onAesChanged(const T &dataIn, DataModification modType, T &dataOut)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Got " << m_aesTypeName << " with mod type " << (int)modType
|
||||
INFO_LOG() << "Got " << m_aesTypeName << " with mod type " << (int)modType
|
||||
<< ", id: " << dataIn.id() << ", chargeType: " << dataIn.chargeStruct().chargeTypeId()
|
||||
<< ", effectState: " << dataIn.effectStateId();
|
||||
if (m_expectedAesId == dataIn.id())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Expected aes id - updating data for " << m_aesTypeName;
|
||||
DEBUG_LOG() << "Expected aes id - updating data for " << m_aesTypeName;
|
||||
dataOut = dataIn;
|
||||
}
|
||||
if (modType == DataModification::eRemoved && dataOut.id() == dataIn.id())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Removed " << m_aesTypeName << " with id " << dataIn.id();
|
||||
DEBUG_LOG() << "Removed " << m_aesTypeName << " with id " << dataIn.id();
|
||||
m_expectedAesId = dataIn.id();
|
||||
}
|
||||
}
|
||||
@@ -73,8 +73,6 @@ protected:
|
||||
bool m_bTestsSuccessful;
|
||||
int m_testId;
|
||||
QString m_aesTypeName;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
int AES_TEST_BASE_EXPORT mainBase(int argc, char **argv,
|
||||
|
||||
Reference in new issue
Block a user