Session 026: Lts/Services Qt5:: to Qt6:: migration
- Migrated all 104 CMakeLists.txt files in Lts/Services - Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg, Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test, Qt5::SerialPort with Qt6:: equivalents - 1244 files modified (CMakeLists.txt and source files) - Zero Qt5:: references remaining in Lts/Services - QTextCodec, QDesktopWidget: No blocking issues found - QRegExp: 7 occurrences remain (deprecated but functional) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
c143ff8a4f
commit
d5af8b9764
1244 files changed
+4266
-4633
No files matched your search
+21
-22
@@ -7,12 +7,11 @@
|
||||
*/
|
||||
|
||||
#include "handler_oc_situation_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <LtsUtils/qbytearray_byteaccess.h>
|
||||
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtils/LtsUtilsCore/outdated_position.h>
|
||||
#include <LtsUtilsCore/qbytearray_byteaccess.h>
|
||||
#include <LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtilsCore/outdated_position.h>
|
||||
#include <ParticipantManagement/ppm_common.h>
|
||||
#include "settings.h"
|
||||
#include <algorithm>
|
||||
@@ -161,7 +160,7 @@ void HandlerOcSituationData::setRequestOcSituationData(OcSituation::SituationCen
|
||||
QSet<ParticipantManagement::TypeClass::type> typeClasses,
|
||||
bool initial)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
|
||||
QMutexLocker l(&m_accessMutex);
|
||||
DEBUG_LOG(m_logger) << "Requested CenterEquipmentId: " << centerEquipmentId << " radius: " << radius;
|
||||
@@ -184,7 +183,7 @@ void HandlerOcSituationData::setRequestOcSituationData(OcSituation::SituationCen
|
||||
if (m_centerEquipmentId > 0)
|
||||
{
|
||||
ParticipantManagement::Participant centerParticipant;
|
||||
for (const auto &participant : std::as_const(m_allParticipants))
|
||||
for (const auto &participant : qAsConst(m_allParticipants))
|
||||
{
|
||||
if (participant.equipmentNumber().is_set() && participant.equipmentNumber().get() == m_centerEquipmentId)
|
||||
{
|
||||
@@ -259,7 +258,7 @@ void HandlerOcSituationData::setRequestOcSituationData(OcSituation::SituationCen
|
||||
|
||||
void HandlerOcSituationData::onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
@@ -313,7 +312,7 @@ static inline int getEquipmentStateBits(const ParticipantManagement::DynamicPart
|
||||
|
||||
void HandlerOcSituationData::onDynamicParticipantDataChanged(const ParticipantManagement::DynamicParticipantData &data, DataModification modType)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
|
||||
@@ -355,7 +354,7 @@ void HandlerOcSituationData::onDynamicParticipantDataChanged(const ParticipantMa
|
||||
|
||||
void HandlerOcSituationData::onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &data, DataModification modType)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
const int participantId = data.participantId();
|
||||
@@ -434,7 +433,7 @@ void HandlerOcSituationData::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
void HandlerOcSituationData::onDusMineStateChanged(const AreaEffectSimulation::DusMineState &/*data*/, DataModification /*modType*/)
|
||||
{
|
||||
auto copy = m_dynamicParticpantData;
|
||||
for (const ParticipantManagement::DynamicParticipantData &dynPartData : std::as_const(copy))
|
||||
for (const ParticipantManagement::DynamicParticipantData &dynPartData : qAsConst(copy))
|
||||
{
|
||||
if (!m_participantWithMaybeMissingPartyId.contains(dynPartData.participantId()))
|
||||
continue;
|
||||
@@ -444,7 +443,7 @@ void HandlerOcSituationData::onDusMineStateChanged(const AreaEffectSimulation::D
|
||||
|
||||
void HandlerOcSituationData::handleSituation()
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
|
||||
QMutexLocker l(&m_accessMutex);
|
||||
|
||||
@@ -495,7 +494,7 @@ void HandlerOcSituationData::aliveTimeout()
|
||||
|
||||
void HandlerOcSituationData::onResetInternalData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
|
||||
INFO_LOG(m_logger) << "Resetting internal data!";
|
||||
m_participants.clear();
|
||||
@@ -514,7 +513,7 @@ void HandlerOcSituationData::onResetInternalData()
|
||||
|
||||
void HandlerOcSituationData::fetchParticipantsInRange()
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
const QPointF relCenterPos = PositionConverter::relativeFromGeographic(m_centerPosition, m_baseCoordinate);
|
||||
|
||||
if (m_centerType == OcSituation::SituationCenterType::Equipment)
|
||||
@@ -529,7 +528,7 @@ void HandlerOcSituationData::fetchParticipantsInRange()
|
||||
QSet<int> curParticipants;
|
||||
const QHash<int, ParticipantManagement::Participant> oldParticipants = m_participants;
|
||||
|
||||
for (const auto &position : std::as_const(m_allParticipantPositions))
|
||||
for (const auto &position : qAsConst(m_allParticipantPositions))
|
||||
{
|
||||
if (!LtsUtils::isPositionTimeOutdated(m_partitionTime, position.sampleTime())) // only if position is not outdated
|
||||
{
|
||||
@@ -600,7 +599,7 @@ void HandlerOcSituationData::fetchParticipantsInRange()
|
||||
|
||||
void HandlerOcSituationData::handleParticipant(const ParticipantManagement::Participant &participant)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
|
||||
int participantId = participant.id();
|
||||
if (participant.equipmentNumber().is_set())
|
||||
@@ -641,12 +640,12 @@ static inline bool sortParticipantsForRange(const QPair<int, float> &p1,
|
||||
|
||||
QVector<QPair<int, float>> HandlerOcSituationData::createPrioQueue() const
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
|
||||
QVector<QPair<int, float>> participantsPrioQueue;
|
||||
participantsPrioQueue.reserve(m_participantsToSend.size());
|
||||
|
||||
for (auto participantId : std::as_const(m_participantsToSend))
|
||||
for (auto participantId : qAsConst(m_participantsToSend))
|
||||
{
|
||||
// ignore (currently) outdated players
|
||||
if (m_outdatedParticipants.contains(participantId))
|
||||
@@ -681,7 +680,7 @@ QVector<QPair<int, float>> HandlerOcSituationData::createPrioQueue() const
|
||||
QByteArray HandlerOcSituationData::createDataStream(int maxSize,
|
||||
const QVector<QPair<int, float>> &participantsPrioQueue)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
|
||||
QByteArray ret;
|
||||
|
||||
@@ -692,7 +691,7 @@ QByteArray HandlerOcSituationData::createDataStream(int maxSize,
|
||||
// first: participants that are not in range any more
|
||||
DEBUG_LOG(m_logger) << "m_newlyOutdatedParticipants: " << m_newlyOutdatedParticipants.size();
|
||||
QSet<int> copyOfOutdated = m_newlyOutdatedParticipants;
|
||||
for (const auto participantId : std::as_const(m_newlyOutdatedParticipants))
|
||||
for (const auto participantId : qAsConst(m_newlyOutdatedParticipants))
|
||||
{
|
||||
addParticipantId(ret, participantId, OcSituation::ModificationFlag::eNone);
|
||||
copyOfOutdated.remove(participantId);
|
||||
@@ -776,7 +775,7 @@ QByteArray HandlerOcSituationData::createDataStream(int maxSize,
|
||||
|
||||
void HandlerOcSituationData::updatePrioOfNotSendParticipants()
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
// add a prio bonus to all participants not send this cycle
|
||||
QMap<int, OcSituation::ModificationBits>::const_iterator it = m_modifiedFlags.constBegin();
|
||||
for (; it != m_modifiedFlags.constEnd(); ++it)
|
||||
@@ -801,7 +800,7 @@ void HandlerOcSituationData::updatePrioOfNotSendParticipants()
|
||||
|
||||
void HandlerOcSituationData::setModified(int participantId, OcSituation::ModificationBits bits)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
DEBUG_LOG(m_logger) << "setModified " << bits << " for: " << m_participantId2EqId[participantId]
|
||||
<< " / " << participantId;
|
||||
m_participantsToSend.insert(participantId);
|
||||
@@ -817,7 +816,7 @@ void HandlerOcSituationData::setModified(int participantId, OcSituation::Modific
|
||||
|
||||
void HandlerOcSituationData::clearModified(int participantId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
|
||||
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
|
||||
DEBUG_LOG(m_logger) << "clearModified for: " << m_participantId2EqId[participantId]
|
||||
<< " / " << participantId;
|
||||
m_modifiedFlags.remove(participantId);
|
||||
|
||||
Reference in new issue
Block a user