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
+14
-15
@@ -25,7 +25,6 @@ WebSocketHandler::WebSocketHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_webSocketServer(new QWebSocketServer(QStringLiteral("WLS"), QWebSocketServer::NonSecureMode, this))
|
||||
, m_basePoint(LtsCoordTrans::UtmCoordinate::fromMgrs(Settings::wlsMgrsBasePoint()))
|
||||
, m_logger(getLogger("WebSocketHandler"))
|
||||
{}
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
@@ -38,7 +37,7 @@ bool WebSocketHandler::init(std::shared_ptr<WlsHandler> wlsHandler,
|
||||
{
|
||||
if (!m_webSocketServer->listen(QHostAddress::Any, listenPort))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Can not listen on port " << listenPort << " - aborting" << m_webSocketServer->errorString();
|
||||
WARNING_LOG() << "Can not listen on port " << listenPort << " - aborting" << m_webSocketServer->errorString();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,7 +58,7 @@ void WebSocketHandler::onNewConnection()
|
||||
if (ws == nullptr)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "New websocket connection from " << ws->peerAddress().toString() << ":" << ws->peerPort();
|
||||
DEBUG_LOG() << "New websocket connection from " << ws->peerAddress().toString() << ":" << ws->peerPort();
|
||||
|
||||
connect(ws, &QWebSocket::textMessageReceived,
|
||||
this, &WebSocketHandler::onTextMessageReceived);
|
||||
@@ -69,14 +68,14 @@ void WebSocketHandler::onNewConnection()
|
||||
connect(this, &WebSocketHandler::signalBroadcastMessage,
|
||||
ws, [this, ws](const QString &msg, int exerciseId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "broadcast: exercise property is valid? " << ws->property(exerciseIdProperty).isValid() << " for " << ws->peerPort();
|
||||
DEBUG_LOG() << "broadcast: exercise property is valid? " << ws->property(exerciseIdProperty).isValid() << " for " << ws->peerPort();
|
||||
|
||||
bool exerciseIdAvailable = false;
|
||||
int wsExerciseId = ws->property(exerciseIdProperty).toInt(&exerciseIdAvailable);
|
||||
|
||||
if (exerciseIdAvailable && wsExerciseId != exerciseId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "broadcast: websocket has " << wsExerciseId << ", but " << exerciseId << " was requested";
|
||||
DEBUG_LOG() << "broadcast: websocket has " << wsExerciseId << ", but " << exerciseId << " was requested";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -103,7 +102,7 @@ void WebSocketHandler::sendTelegramInternal(const TrainingAreaBase::TetraIcd::Tr
|
||||
|
||||
|
||||
const QString jsonStr(QString::fromUtf8(QJsonDocument(obj).toJson(QJsonDocument::Compact)));
|
||||
DEBUG_LOG(m_logger) << "jsonStr: " << jsonStr;
|
||||
DEBUG_LOG() << "jsonStr: " << jsonStr;
|
||||
|
||||
emit signalBroadcastMessage(jsonStr, exerciseId);
|
||||
}
|
||||
@@ -140,7 +139,7 @@ void WebSocketHandler::onTextMessageReceived(const QString &baJson)
|
||||
{
|
||||
using namespace TrainingAreaBase::TetraIcd;
|
||||
|
||||
TRACE_LOG(m_logger) << "WebSocketHandler::onTextMessageReceived: " << baJson;
|
||||
TRACE_LOG() << "WebSocketHandler::onTextMessageReceived: " << baJson;
|
||||
QWebSocket *ws = qobject_cast<QWebSocket*>(sender());
|
||||
|
||||
if (ws == nullptr)
|
||||
@@ -154,7 +153,7 @@ void WebSocketHandler::onTextMessageReceived(const QString &baJson)
|
||||
|
||||
if (err.error != QJsonParseError::NoError)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "received invalid json from websocket at " << err.offset << ": " << err.errorString();
|
||||
ERROR_LOG() << "received invalid json from websocket at " << err.offset << ": " << err.errorString();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -173,7 +172,7 @@ void WebSocketHandler::onTextMessageReceived(const QString &baJson)
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -192,7 +191,7 @@ void WebSocketHandler::onTextMessageReceived(const QString &baJson)
|
||||
{
|
||||
int exerciseId = ExerciseStateData::fromJson(data).exerciseId;
|
||||
ws->setProperty(exerciseIdProperty, exerciseId);
|
||||
DEBUG_LOG(m_logger) << "set exercise id " << exerciseId << " for ws with peer port " << ws->peerPort();
|
||||
DEBUG_LOG() << "set exercise id " << exerciseId << " for ws with peer port " << ws->peerPort();
|
||||
sendParticipantConnectionStates(exerciseId);
|
||||
break;
|
||||
}
|
||||
@@ -203,14 +202,14 @@ void WebSocketHandler::onTextMessageReceived(const QString &baJson)
|
||||
m_participantHandler->handleWlsBinarySfmData(WlsBinarySfmData::fromJson(data));
|
||||
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;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -272,16 +271,16 @@ void WebSocketHandler::setPosition(T &tele, const WlsParticipant *participant)
|
||||
|
||||
void WebSocketHandler::sendPosition(const WlsParticipant *participant)
|
||||
{
|
||||
INFO_LOG(m_logger) << "sendPosition equipmentNumber=" << participant->equipmentNumber();
|
||||
INFO_LOG() << "sendPosition equipmentNumber=" << participant->equipmentNumber();
|
||||
if (!participant || !participant->positionIsValid() || participant->equipmentNumber() == 0)
|
||||
{
|
||||
INFO_LOG(m_logger) << "not send - participant is not yet fully initialized";
|
||||
INFO_LOG() << "not send - participant is not yet fully initialized";
|
||||
return;
|
||||
}
|
||||
|
||||
if (participant->isGpsMode())
|
||||
{
|
||||
INFO_LOG(m_logger) << "not send - participant is in gps mode";
|
||||
INFO_LOG() << "not send - participant is in gps mode";
|
||||
return;
|
||||
}
|
||||
TrainingAreaBase::TetraIcd::PositionReport posValue;
|
||||
|
||||
Reference in new issue
Block a user