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
+18
-19
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "polygons.h"
|
||||
#include <utility>
|
||||
#include "tne_algorithmen.h"
|
||||
|
||||
#include <aes.hpp>
|
||||
@@ -15,8 +14,8 @@
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <LtsCoordinate/lts_coord_vector.h>
|
||||
#include <LtsCoordinate/lts_coordinate.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ProjectDataManagement/pdm_db_structs.h>
|
||||
#include <Trajectory/trajectory_helper.h>
|
||||
|
||||
@@ -113,7 +112,7 @@ static QPolygonF utmToGeogrphic(const QPolygonF &polyUtm, const LtsCoordTrans::U
|
||||
{
|
||||
QPolygonF poly;
|
||||
poly.reserve(polyUtm.size());
|
||||
for (const QPointF &point : std::as_const(polyUtm))
|
||||
for (const QPointF &point : qAsConst(polyUtm))
|
||||
poly << base.geographic(point);
|
||||
return poly;
|
||||
}
|
||||
@@ -477,7 +476,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS(const Database::AesEffectClu
|
||||
|
||||
vec.reserve(impactCount);
|
||||
const QTransform trans(fromRotation(-effectCluster.rotationAngle)); // Compass, not mathematical!
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
{
|
||||
QPointF p = impactPositionUtm.geographic(trans.map(point));
|
||||
DEBUG_LOG(logger) << "Point = " << p;
|
||||
@@ -553,7 +552,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec
|
||||
|
||||
QVector<LtsCoordTrans::UtmCoordinate> mtps_asRealUtm;
|
||||
mtps_asRealUtm.reserve(mtps_asUtm.size());
|
||||
for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm))
|
||||
for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm))
|
||||
{
|
||||
// convert QPointF back to UtmCoordinate: pay attention to order!!!
|
||||
const LtsCoordTrans::UtmCoordinate mtpUtm(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y());
|
||||
@@ -592,7 +591,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec
|
||||
|
||||
int idx = 0;
|
||||
const QTransform transform(fromRotation(-mtpRotationNorthDegree)); // Compass, not mathematical!
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
{
|
||||
// which mtp:
|
||||
int mtpIdx = (idx++ % mtps_asUtm.size()); // modulo
|
||||
@@ -607,7 +606,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec
|
||||
<< ", randomNumber=" << randomNumber << " singleWidthOut=" << singleWidthOut << " singleHeightOut=" << singleHeightOut
|
||||
<< " rot=" << explosionCluster.rotationAngle;
|
||||
|
||||
for (auto item : std::as_const(finalVec))
|
||||
for (auto item : qAsConst(finalVec))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(item);
|
||||
qCritical() << " TNE VERIFICATION: CHECK:"
|
||||
@@ -901,7 +900,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS(const Database::AesExplos
|
||||
|
||||
vec.reserve(impactCount);
|
||||
const QTransform trans(fromRotation(-explosionCluster.rotationAngle)); // Compass, not mathematical!
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
{
|
||||
QPointF p = impactPositionUtm.geographic(trans.map(point));
|
||||
DEBUG_LOG(logger) << "Point = " << p;
|
||||
@@ -978,7 +977,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx
|
||||
|
||||
QVector<LtsCoordTrans::UtmCoordinate> mtps_asRealUtm;
|
||||
mtps_asRealUtm.reserve(mtps_asUtm.size());
|
||||
for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm))
|
||||
for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm))
|
||||
{
|
||||
// convert QPointF back to UtmCoordinate: pay attention to order!!!
|
||||
const LtsCoordTrans::UtmCoordinate mtpUtm(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y());
|
||||
@@ -1017,7 +1016,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx
|
||||
|
||||
int idx = 0;
|
||||
const QTransform transform(fromRotation(-mtpRotationNorthDegree)); // Compass, not mathematical!
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
{
|
||||
// which mtp:
|
||||
int mtpIdx = (idx++ % mtps_asUtm.size()); // modulo
|
||||
@@ -1032,7 +1031,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx
|
||||
<< ", randomNumber=" << randomNumber << " singleWidthOut=" << singleWidthOut << " singleHeightOut=" << singleHeightOut
|
||||
<< " rot=" << explosionCluster.rotationAngle;
|
||||
|
||||
for (auto item : std::as_const(finalVec))
|
||||
for (auto item : qAsConst(finalVec))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(item);
|
||||
qCritical() << " TNE VERIFICATION: CHECK:"
|
||||
@@ -1649,7 +1648,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
std::vector<Core::GeoPosition> &singlePositionsOut,
|
||||
NGL::INGLLogger &logger)
|
||||
{
|
||||
TRACE_LOG(logger) << Q_FUNC_INFO << " START, participantId=" << unitParticipantId;
|
||||
TRACE_LOG(logger) << LOGFUNCTION << " START, participantId=" << unitParticipantId;
|
||||
|
||||
static const LtsUtils::QPoint3D s_invalidPos(std::nan(""), std::nan(""), std::nan(""));
|
||||
|
||||
@@ -1657,7 +1656,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
// See also GUEZE-2309
|
||||
if (!ppmDtc)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " ERROR, no ppmDtc";
|
||||
ERROR_LOG(logger) << LOGFUNCTION << " ERROR, no ppmDtc";
|
||||
return s_invalidPos;
|
||||
}
|
||||
ppmDtc->waitForHistoricalDataParticipant(1000);
|
||||
@@ -1665,7 +1664,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
const ParticipantManagement::Participant &partData = ppmDtc->participant(unitParticipantId);
|
||||
if (partData.id() != unitParticipantId)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " ERROR, participant failed for id =" << unitParticipantId;
|
||||
ERROR_LOG(logger) << LOGFUNCTION << " ERROR, participant failed for id =" << unitParticipantId;
|
||||
return s_invalidPos;
|
||||
}
|
||||
ppmDtc->waitForHistoricalDataParticipantPosition(1000);
|
||||
@@ -1679,13 +1678,13 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
int childCount = 0;
|
||||
LtsUtils::QPoint3D pos;
|
||||
|
||||
for (int childId : std::as_const(childIds))
|
||||
for (int childId : qAsConst(childIds))
|
||||
{
|
||||
const ParticipantManagement::ParticipantPosition &childPos = ppmDtc->participantPosition(childId);
|
||||
if (childPos.participantId() != childId)
|
||||
{
|
||||
// may happen in real life: so ERROR_LOG to DEBUG_LOG
|
||||
DEBUG_LOG(logger) << Q_FUNC_INFO << " ERROR, participantPosition failed for id =" << childId;
|
||||
DEBUG_LOG(logger) << LOGFUNCTION << " ERROR, participantPosition failed for id =" << childId;
|
||||
return s_invalidPos;
|
||||
}
|
||||
const Core::GeoPosition &childGeoPos = childPos.pos();
|
||||
@@ -1710,7 +1709,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
}
|
||||
DEBUG_LOG(logger) << "Participant " << unitParticipantId << ": Mean position: " << centerPosToReturn << " #relevant children: " << childCount;
|
||||
|
||||
TRACE_LOG(logger) << Q_FUNC_INFO << " END, participantId=" << unitParticipantId;
|
||||
TRACE_LOG(logger) << LOGFUNCTION << " END, participantId=" << unitParticipantId;
|
||||
return centerPosToReturn;
|
||||
}
|
||||
|
||||
@@ -1732,7 +1731,7 @@ std::vector<Core::GeoPosition2D> dangerAreaDefaultSegments(const QPointF ¢er
|
||||
// polyUtm = QTransform().rotate(0).map(polyUtm);
|
||||
LtsCoordTrans::UtmCoordinate impactPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(centerPos);
|
||||
const QPolygonF poly(utmToGeogrphic(polyUtm, impactPositionUtm));
|
||||
for (const auto &p : std::as_const(poly))
|
||||
for (const auto &p : qAsConst(poly))
|
||||
segments.push_back(Core::GeoPosition2D(p.x(), p.y()));
|
||||
|
||||
return segments;
|
||||
|
||||
Reference in new issue
Block a user