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
+17
-18
@@ -7,16 +7,15 @@
|
||||
*/
|
||||
|
||||
#include "ces_building_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <Buildings/BuildingControlUnit/VWM/vwm_xml_reader.h>
|
||||
#include <Buildings/BuildingControlUnit/VWM/vwm_math.h>
|
||||
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtilsCore/dds_vector.h>
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#include <QtCore/QLineF>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QLineF>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
@@ -91,20 +90,20 @@ bool BuildingModel::init(
|
||||
)
|
||||
{
|
||||
m_buildingId = buildingId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, m_buildingId=" << m_buildingId;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, m_buildingId=" << m_buildingId;
|
||||
|
||||
m_angle = mse.angle() * M_PI / 180.;
|
||||
m_refPosGeo = mse.geoPosition();
|
||||
m_refPosUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(mse.geoPosition().lon(), mse.geoPosition().lat());
|
||||
m_refPos = {m_refPosUtm.x, m_refPosUtm.y, m_refPosGeo.z()};
|
||||
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START, m_buildingId=" << m_buildingId
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START, m_buildingId=" << m_buildingId
|
||||
<< ", m_angle=" << m_angle
|
||||
<< ", m_refPosGeo=" << m_refPosGeo
|
||||
<< ", m_refPos=" << m_refPos;
|
||||
|
||||
|
||||
for (const InfrastructureManagement::FootprintElement &footprintElement : std::as_const(mfp.elements()))
|
||||
for (const InfrastructureManagement::FootprintElement &footprintElement : qAsConst(mfp.elements()))
|
||||
m_footprint << QPointF(footprintElement.relPosition().offsetX(), footprintElement.relPosition().offsetY());
|
||||
if (m_footprint.isEmpty())
|
||||
{
|
||||
@@ -123,14 +122,14 @@ bool BuildingModel::init(
|
||||
|
||||
m_height = DBL_MIN;
|
||||
const QMap<int, BuildingControlUnit::VWM::Room> &roomMap = rooms();
|
||||
for (const BuildingControlUnit::VWM::Room &room : std::as_const(roomMap))
|
||||
for (const BuildingControlUnit::VWM::OuterWall &outerWall : std::as_const(room.outerWalls()))
|
||||
for (const BuildingControlUnit::VWM::WallElement &wallElement : std::as_const(outerWall.elements()))
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(wallElement))
|
||||
for (const BuildingControlUnit::VWM::Room &room : qAsConst(roomMap))
|
||||
for (const BuildingControlUnit::VWM::OuterWall &outerWall : qAsConst(room.outerWalls()))
|
||||
for (const BuildingControlUnit::VWM::WallElement &wallElement : qAsConst(outerWall.elements()))
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(wallElement))
|
||||
if (point.z() > m_height)
|
||||
m_height = point.z();
|
||||
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, m_buildingId=" << m_buildingId;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END, m_buildingId=" << m_buildingId;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -141,7 +140,7 @@ bool BuildingModel::init(
|
||||
|
||||
bool BuildingModel::hasIntersectionSimplified(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &end) const
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " m_buildingId=" << m_buildingId
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " m_buildingId=" << m_buildingId
|
||||
<< ", start=" << start << ", end=" << end;
|
||||
|
||||
// keep origin of QRect (topLeft) in mind:
|
||||
@@ -230,7 +229,7 @@ bool BuildingModel::hasIntersection(const LtsUtils::QPoint3D &start, const LtsUt
|
||||
|
||||
bool bHasIntersection = BuildingControlUnit::VWM::Math::hasIntersection(start, end, rooms());
|
||||
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " m_buildingId=" << m_buildingId
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " m_buildingId=" << m_buildingId
|
||||
<< ", start=" << start << ", end=" << end
|
||||
<< ", rooms().size()" << rooms().size()
|
||||
<< ", bHasIntersection=" << bHasIntersection;
|
||||
@@ -312,7 +311,7 @@ QVector<LtsUtils::QPoint3D> BuildingModel::fromGeographic(const std::vector<Core
|
||||
{
|
||||
QVector<LtsUtils::QPoint3D> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const Core::GeoPosition &point : std::as_const(points))
|
||||
for (const Core::GeoPosition &point : qAsConst(points))
|
||||
ret.append(fromGeographic(point));
|
||||
return ret;
|
||||
}
|
||||
@@ -327,7 +326,7 @@ std::vector<Core::GeoPosition> BuildingModel::toGeographic(const QVector<LtsUtil
|
||||
{
|
||||
std::vector<Core::GeoPosition> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(points))
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(points))
|
||||
ret.push_back(toGeographic(point));
|
||||
return ret;
|
||||
}
|
||||
@@ -342,7 +341,7 @@ QVector<LtsUtils::QPoint3D> BuildingModel::fromReference(const QVector<LtsUtils:
|
||||
{
|
||||
QVector<LtsUtils::QPoint3D> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(points))
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(points))
|
||||
ret.append(fromReference(point));
|
||||
return ret;
|
||||
}
|
||||
@@ -356,7 +355,7 @@ QVector<LtsUtils::QPoint3D> BuildingModel::toReference(const QVector<LtsUtils::Q
|
||||
{
|
||||
QVector<LtsUtils::QPoint3D> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(points))
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(points))
|
||||
ret.append(toReference(point));
|
||||
return ret;
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#include <InfrastructureManagement/ism.hpp>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include <QPolygonF>
|
||||
|
||||
using namespace CentralEffectSimulation;
|
||||
|
||||
+13
-14
@@ -7,19 +7,18 @@
|
||||
*/
|
||||
|
||||
#include "handler_aes_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
|
||||
#include <QPainterPath>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QPointF>
|
||||
#include <QPolygonF>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
#include <QTransform>
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#define TIMEDIFFVALID 3000
|
||||
@@ -235,7 +234,7 @@ void HandlerAesData::calculateBuildingExplosion(const AreaEffectSimulation::Char
|
||||
|
||||
// Bounding-Box-Check
|
||||
// QMap<int, Footprint> m_handlerBuildingData.getFootprints();
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints))
|
||||
{
|
||||
|
||||
const Core::GeoPosition2D impactPosition2D(impactPosition.lon(), impactPosition.lat());
|
||||
@@ -407,7 +406,7 @@ void HandlerAesData::onEffectsChanged(const AreaEffectSimulation::Effects &effec
|
||||
|
||||
// calculate for every building of our exercise:
|
||||
const QHash<int, CentralEffectSimulation::HandlerBuildingData::Footprint> &footprints = m_handlerBuildingData->getFootprints();
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints))
|
||||
{
|
||||
calculateImpacts(effects, footprint);
|
||||
}
|
||||
@@ -494,7 +493,7 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
// Vulnerability should be calculated
|
||||
|
||||
const QHash<int, CentralEffectSimulation::HandlerBuildingData::Footprint> &footprints = m_handlerBuildingData->getFootprints();
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints))
|
||||
{
|
||||
calculateImpacts(data, aesItemView, footprint);
|
||||
} // for
|
||||
@@ -586,7 +585,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
|
||||
CentralEffectSimulation::BitfieldStates &bitfieldStates = m_bitfieldStatesBld[footprint.mseId];
|
||||
QSet<int> &bitfieldState = bitfieldStates[aesItemId];
|
||||
for (int i : std::as_const(bitfieldState))
|
||||
for (int i : qAsConst(bitfieldState))
|
||||
DEBUG_LOG(m_logger) << "bitfieldState for " << aesItemId << ": " << i;
|
||||
|
||||
for (int32_t bitFieldIdx = 0; bitFieldIdx < data.impactCount(); ++bitFieldIdx)
|
||||
@@ -600,7 +599,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
continue;
|
||||
|
||||
const Core::GeoPosition &impactPosition = aesItemView.form()[bitFieldIdx];
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION
|
||||
<< " impactPosition: lat/lon" << impactPosition.lat() << "/" << impactPosition.lon() << " z=" << impactPosition.z()
|
||||
<< " UTM=" << CentralEffectSimulation::debug(CentralEffectSimulation::geographic2Utm(impactPosition));
|
||||
|
||||
@@ -711,7 +710,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
|
||||
|
||||
const std::vector<AreaEffectSimulation::SingleEffect> &singleEffectsRef = effects.singleEffects();
|
||||
int indexBitFieldIdx = -1;
|
||||
for (const AreaEffectSimulation::SingleEffect &singleEffect : std::as_const(singleEffectsRef))
|
||||
for (const AreaEffectSimulation::SingleEffect &singleEffect : qAsConst(singleEffectsRef))
|
||||
{
|
||||
++indexBitFieldIdx;
|
||||
|
||||
@@ -856,7 +855,7 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary data.form().size()=" << data.form().size();
|
||||
// BoobyTrap
|
||||
polyGeo.reserve(data.form().size());
|
||||
for (const auto &pointGeo : std::as_const(data.form()))
|
||||
for (const auto &pointGeo : qAsConst(data.form()))
|
||||
{
|
||||
QPointF point;
|
||||
point.setX(pointGeo.lon());
|
||||
@@ -873,7 +872,7 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
<< " exerciseId=" << exerciseId;
|
||||
// only include buildings within the radius
|
||||
|
||||
for (const int buildingId : std::as_const(buildingIdsInside))
|
||||
for (const int buildingId : qAsConst(buildingIdsInside))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " BuildingId=" << buildingId;
|
||||
Buildings::Building tmpBldg;
|
||||
@@ -959,7 +958,7 @@ QVector<int> HandlerAesData::findBuildingsBetween(const LtsCoordTrans::LtsCoordi
|
||||
// check all exercise specific footprints except our:
|
||||
const QHash<int, CentralEffectSimulation::HandlerBuildingData::Footprint> &allFootprintsOfEx = m_handlerBuildingData->getFootprints();
|
||||
buildingIdsInBetween.reserve(allFootprintsOfEx.size());
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprintToCheck : std::as_const(allFootprintsOfEx))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprintToCheck : qAsConst(allFootprintsOfEx))
|
||||
{
|
||||
// do not check ourself
|
||||
if (footprintToCheck.mseId == targetFootprint.mseId)
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QVector>
|
||||
#include <QPolygonF>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
|
||||
namespace LtsUtils
|
||||
{
|
||||
|
||||
+19
-20
@@ -7,14 +7,13 @@
|
||||
*/
|
||||
|
||||
#include "handler_building_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <CentralEffectSimulation/logger.h>
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QVector3D>
|
||||
|
||||
// operator<<
|
||||
@@ -52,19 +51,19 @@ HandlerBuildingModel::HandlerBuildingModel(
|
||||
, m_aesDataHandler(aesDataHandler)
|
||||
, m_logger(CentralEffectSimulation::getLogger("Plugin.Buildings.HandlerBuildingModel"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
HandlerBuildingModel::~HandlerBuildingModel()
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
bool HandlerBuildingModel::init()
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Dtc> dtcIsm = m_ddsHandler->dtcIsm();
|
||||
|
||||
dtcIsm->waitForHistoricalDataMainStructureElement(1000);
|
||||
@@ -79,14 +78,14 @@ bool HandlerBuildingModel::init()
|
||||
|
||||
INFO_LOG(m_logger) << "HandlerBuildingModel is running."
|
||||
<< ", m_buildingModels.size() = " << m_buildingModels.size();
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
HandlerBuildingModelInterface::LineBuildingIntersectionResult HandlerBuildingModel::getLineBuildingIntersection(
|
||||
const std::vector<Core::GeoPosition> &line, const std::string &requestIdOpt)
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
|
||||
CentralEffectSimulation::GetLineBuildingIntersectionRequest newRequest;
|
||||
newRequest.line(line);
|
||||
@@ -105,13 +104,13 @@ HandlerBuildingModelInterface::LineBuildingIntersectionResult HandlerBuildingMod
|
||||
result.errorParams = reply.errorParams();
|
||||
result.intersection = reply.intersection();
|
||||
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
return result;
|
||||
}
|
||||
|
||||
HandlerBuildingModelInterface::LineBuildingIntersectsResult HandlerBuildingModel::getLineBuildingIntersects(const std::vector<Core::GeoPosition> &line, const std::string &requestIdOpt)
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
|
||||
CentralEffectSimulation::GetLineBuildingIntersectionRequest newRequest;
|
||||
newRequest.line(line);
|
||||
@@ -130,7 +129,7 @@ HandlerBuildingModelInterface::LineBuildingIntersectsResult HandlerBuildingModel
|
||||
result.errorParams = reply.errorParams();
|
||||
result.intersects = ! std::isnan(reply.intersection().lat()); // ! std::isnan
|
||||
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -322,7 +321,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
|
||||
QPolygonF polygon2D;
|
||||
polygon2D.reserve(polylineRef.size());
|
||||
for (const Core::GeoPosition &geoPos : std::as_const(polylineRef))
|
||||
for (const Core::GeoPosition &geoPos : qAsConst(polylineRef))
|
||||
polygon2D << QPointF(geoPos.lon(), geoPos.lat());
|
||||
|
||||
// Only the buildings where the line/trajectory flies over the building footprint are taken into account.
|
||||
@@ -333,7 +332,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "relevantBuildings.size=" << relevantBuildings.size();
|
||||
for (const int bldgId : std::as_const(relevantBuildings))
|
||||
for (const int bldgId : qAsConst(relevantBuildings))
|
||||
DEBUG_LOG(m_logger) << "relevantBuilding: bldgId = " << bldgId;
|
||||
}
|
||||
|
||||
@@ -369,8 +368,8 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
<< " , end=" << segEnd;
|
||||
|
||||
int buildingId = -1; // for debugging purposes
|
||||
//for (BuildingModel *buildingModel : std::as_const(m_buildingModels))
|
||||
for (const int bldgId : std::as_const(relevantBuildings))
|
||||
//for (BuildingModel *buildingModel : qAsConst(m_buildingModels))
|
||||
for (const int bldgId : qAsConst(relevantBuildings))
|
||||
{
|
||||
BuildingModel *buildingModel = m_buildingModels.value(bldgId, nullptr);
|
||||
if (!buildingModel)
|
||||
@@ -488,7 +487,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
|
||||
} // if
|
||||
|
||||
} // for (const int bldgId : std::as_const(relevantBuildings))
|
||||
} // for (const int bldgId : qAsConst(relevantBuildings))
|
||||
} // for(lineIt = polylineRef.begin(); lineIt != polylineRef.end()-1; ++lineIt)
|
||||
|
||||
DEBUG_LOG(m_logger) << "END getLineBuildingIntersectionInternal, request '" << request.requestId() << "'"
|
||||
@@ -661,12 +660,12 @@ CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDet
|
||||
|
||||
Core::GeoPosition HandlerBuildingModel::calculateDetonationLocation(const std::vector<Core::GeoPosition> &trajectoryGeometry, double detonationDistance) const
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
|
||||
const int geometrySize = trajectoryGeometry.size();
|
||||
if (geometrySize < 3)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", trajectoryGeometry not sufficiant";
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << ", trajectoryGeometry not sufficiant";
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@
|
||||
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QMap>
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
|
||||
|
||||
namespace NGL
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
namespace CesBuildings
|
||||
|
||||
+4
-5
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "handler_contamination.h"
|
||||
#include <utility>
|
||||
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
@@ -157,7 +156,7 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
|
||||
bool isGroundLevel = false;
|
||||
const QVector<int> &buildingIds = dtcIsm.get()->getBuildingByPolygon(exerciseId, polygonGeo, completeEnclosed, isGroundLevel);
|
||||
DEBUG_LOG(m_logger) << "buildingIds.size=" << buildingIds.size();
|
||||
for (int buildingId : std::as_const(buildingIds))
|
||||
for (int buildingId : qAsConst(buildingIds))
|
||||
{
|
||||
calculateBuilding(buildingId, data, chargeHeight, chargeDepression);
|
||||
}
|
||||
@@ -193,7 +192,7 @@ void HandlerContamination::calculateBuilding(int buildingId,
|
||||
DEBUG_LOG(m_logger) << "buildingId=" << buildingId;
|
||||
effectedRooms.clear();
|
||||
effectedFloors = getEffectedFloors(buildingId, chargeHeight, chargeDepression);
|
||||
for (int effectedFloor : std::as_const(effectedFloors))
|
||||
for (int effectedFloor : qAsConst(effectedFloors))
|
||||
effectedRooms += dtcIsm.get()->getRoomIdsFromFloorId(buildingId, effectedFloor);
|
||||
if (!effectedRooms.empty())
|
||||
{
|
||||
@@ -256,7 +255,7 @@ void HandlerContamination::onBuildingStateChanged(const Buildings::BuildingState
|
||||
// Buildings that have been reset or decontaminated will be recontaminated as long as the nuclear weapon is still present
|
||||
|
||||
const auto aesItemViews = m_ddsHandler->dtcAes()->aesItemViews();
|
||||
for (const auto &aesItemView : std::as_const(aesItemViews))
|
||||
for (const auto &aesItemView : qAsConst(aesItemViews))
|
||||
{
|
||||
if (aesItemView.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
{
|
||||
@@ -371,7 +370,7 @@ QVector<int> HandlerContamination::getEffectedFloors(const int buildingId, const
|
||||
const QVector<int> &floorIds = dtcIsm->getFloorIdsFromBuilding(buildingId);
|
||||
QVector<int> effectedFloorIds;
|
||||
effectedFloorIds.reserve(floorIds.size());
|
||||
for (int floorId : std::as_const(floorIds))
|
||||
for (int floorId : qAsConst(floorIds))
|
||||
{
|
||||
double halfFloorHeight = dtcIsm->getHalfFloorHeight(buildingId, floorId);
|
||||
DEBUG_LOG(m_logger) << " floorId=" << floorId
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <CentralEffectSimulation/proxy_building.h>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
|
||||
namespace CesBuildings
|
||||
{
|
||||
|
||||
+2
-3
@@ -22,7 +22,7 @@
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace CesBuildings
|
||||
@@ -64,7 +64,6 @@ private Q_SLOTS:
|
||||
bool init(int domainId, int exerciseId) override;
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
private:
|
||||
CentralEffectSimulation::Plugin::DataProvider *m_pdp{nullptr};
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
@@ -80,7 +79,7 @@ private:
|
||||
std::shared_ptr<HandlerBuildingModel> m_handlerBuildingModel;
|
||||
|
||||
|
||||
CentralEffectSimulation::
|
||||
CentralEffectSimulation::LOGGER_T m_logger;
|
||||
int m_domainId{0};
|
||||
int m_exerciseId{0};
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user