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
+5
-5
@@ -30,14 +30,14 @@ bool ConvertFromJson::handleTelegram(const QByteArray &baJson, int &recvCounter)
|
||||
if (!sendCounter.isDouble())
|
||||
return false;
|
||||
recvCounter = sendCounter.toInt(-1);
|
||||
DEBUG_LOG(m_logger) << "Incoming telegram with Id " << obj.value(QStringLiteral("type")).toString();
|
||||
DEBUG_LOG() << "Incoming telegram with Id " << obj.value(QStringLiteral("type")).toString();
|
||||
if (recvCounter < 0)
|
||||
return false;
|
||||
}
|
||||
const QJsonValue typeId = obj.value(QStringLiteral("typeId"));
|
||||
if (!typeId.isDouble())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Can not read type id: " << baJson;
|
||||
ERROR_LOG() << "Can not read type id: " << baJson;
|
||||
return false;
|
||||
}
|
||||
const QJsonObject data = obj.value(QStringLiteral("data")).toObject();
|
||||
@@ -163,14 +163,14 @@ bool ConvertFromJson::handleTelegram(const QByteArray &baJson, int &recvCounter)
|
||||
|
||||
break;
|
||||
default:
|
||||
WARNING_LOG(m_logger) << "Handler for telegram Id " << typeId.toInt()
|
||||
WARNING_LOG() << "Handler for telegram Id " << typeId.toInt()
|
||||
<< " not yet implemented (" << baJson << ")";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not parse json: " << e.what() << " (" << baJson << ")";
|
||||
WARNING_LOG() << "Could not parse json: " << e.what() << " (" << baJson << ")";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -183,7 +183,7 @@ void ConvertFromJson::rxData(const T &data)
|
||||
{
|
||||
if (!m_bWarnedOnce)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "No RecvFromTab available";
|
||||
ERROR_LOG() << "No RecvFromTab available";
|
||||
m_bWarnedOnce = true;
|
||||
}
|
||||
return;
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ private:
|
||||
std::shared_ptr<TrainingAreaBase::RecvFromTab> m_rxHandler;
|
||||
protected:
|
||||
bool m_bWarnedOnce;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+3
-3
@@ -240,7 +240,7 @@ bool ConvertToJson::txData(const TrainingAreaBase::TetraIcd::Sanitation &data)
|
||||
|
||||
bool ConvertToJson::txData(const TrainingAreaBase::TetraIcd::SelectiveReammunition &data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ConvertToJson::txData SelectiveReammunition";
|
||||
DEBUG_LOG() << "ConvertToJson::txData SelectiveReammunition";
|
||||
return sendToTx(&data);
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ bool ConvertToJson::txData(const TrainingAreaBase::TetraIcd::SetDevicePowerReque
|
||||
|
||||
bool ConvertToJson::txData(const TrainingAreaBase::TetraIcd::OcCommand &data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ConvertToJson::txData OcCommand";
|
||||
DEBUG_LOG() << "ConvertToJson::txData OcCommand";
|
||||
return sendToTx(&data);
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ bool ConvertToJson::sendToTx(const TrainingAreaBase::TetraIcd::TrainingAreaTeleg
|
||||
obj[QStringLiteral("counter")] = m_sendCounter++;
|
||||
const QByteArray ba = QJsonDocument(obj).toJson(QJsonDocument::Compact);
|
||||
if (data->id() != TrainingAreaBase::TetraIcd::TelegramId::BESTAETIGUNG)
|
||||
DEBUG_LOG(m_logger) << "Sending tele: " << ba;
|
||||
DEBUG_LOG() << "Sending tele: " << ba;
|
||||
emit outgoingMessage(ba);
|
||||
return true;
|
||||
}
|
||||
|
||||
-1
@@ -75,7 +75,6 @@ protected:
|
||||
protected:
|
||||
int m_sendCounter;
|
||||
bool m_bConnected;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
|
||||
|
||||
+7
-7
@@ -45,7 +45,7 @@ TetraJsonInterfaceImpl::TetraJsonInterfaceImpl(TrainingAreaBase::Plugin::DataPro
|
||||
settings->settings()->value(QLatin1String("AES/use2BytesForSingleFireDiameter"), true).toBool());
|
||||
N_CoPrtCnv::CoPrtCnvTelegramConverter::setUsePvSan(
|
||||
settings->settings()->value(QLatin1String("TrainingAreaBase/UsePvSan"), false).toBool());
|
||||
ERROR_LOG(m_logger) << "hello i got this!";
|
||||
ERROR_LOG() << "hello i got this!";
|
||||
}
|
||||
|
||||
TetraJsonInterfaceImpl::~TetraJsonInterfaceImpl()
|
||||
@@ -70,7 +70,7 @@ void TetraJsonInterfaceImpl::exerciseChanged()
|
||||
NOTICE_LOG(m_logger) << "TetraJsonInterfaceImpl::exerciseChanged";
|
||||
if (m_pdp->exerciseRadioGroup().id() != m_radioGrpId)
|
||||
if (!updatePrtCnv())
|
||||
ERROR_LOG(m_logger) << "Error changing PrtCnv state from radio grp id: "
|
||||
ERROR_LOG() << "Error changing PrtCnv state from radio grp id: "
|
||||
<< m_radioGrpId
|
||||
<< " to " << m_pdp->exerciseRadioGroup().id();
|
||||
}
|
||||
@@ -92,7 +92,7 @@ bool TetraJsonInterfaceImpl::updatePrtCnv()
|
||||
QFile::remove(iniFileOut());
|
||||
if (!QFile::copy(iniFileIn(), iniFileOut()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error creating ini file for PrtCnv: " << iniFileOut();
|
||||
ERROR_LOG() << "Error creating ini file for PrtCnv: " << iniFileOut();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -133,10 +133,10 @@ bool TetraJsonInterfaceImpl::checkConfigTemplates()
|
||||
{
|
||||
if (!QFile::exists(iniFileIn()))
|
||||
{
|
||||
INFO_LOG(m_logger) << "Creating " << iniFileIn();
|
||||
INFO_LOG() << "Creating " << iniFileIn();
|
||||
if (!QFile::copy(QStringLiteral(":/PrtCnv.dat"), iniFileIn()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error creating " << iniFileIn();
|
||||
ERROR_LOG() << "Error creating " << iniFileIn();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -145,10 +145,10 @@ bool TetraJsonInterfaceImpl::checkConfigTemplates()
|
||||
|
||||
if (!QFile::exists(playerIdsFile()))
|
||||
{
|
||||
INFO_LOG(m_logger) << "Creating " << playerIdsFile();
|
||||
INFO_LOG() << "Creating " << playerIdsFile();
|
||||
if (!QFile::copy(QStringLiteral(":/playerIds.dat"), playerIdsFile()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error creating " << playerIdsFile();
|
||||
ERROR_LOG() << "Error creating " << playerIdsFile();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -63,6 +63,5 @@ private:
|
||||
PrtCnv::PrtCnvApplication *m_prtCnvApp;
|
||||
int m_exerciseId;
|
||||
int m_radioGrpId;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user