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
+1
-1
@@ -11,7 +11,7 @@
|
||||
#include <ngldb/dbtransaction.h>
|
||||
#include <ngldb/nsqlquery.h>
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QVariant>
|
||||
|
||||
using namespace ReportManagement;
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QVariant>
|
||||
|
||||
using namespace ReportManagement;
|
||||
|
||||
|
||||
+2
-3
@@ -7,12 +7,11 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QJsonDocument>
|
||||
|
||||
using namespace ReportManagement;
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -106,7 +105,7 @@ bool HandlerReportData::generateBuildingDamageResult(const CreateModifyReportReq
|
||||
|
||||
qInsert.bindValue(QStringLiteral(":reportId"), reportId);
|
||||
|
||||
for (const BuildingDamageData &bdData : std::as_const(m_buildingDamageData))
|
||||
for (const BuildingDamageData &bdData : qAsConst(m_buildingDamageData))
|
||||
{
|
||||
qInsert.bindValue(QStringLiteral(":bldId"), bdData.buildingId);
|
||||
qInsert.bindValue(QStringLiteral(":time"), bdData.timePoint);
|
||||
|
||||
+10
-11
@@ -7,13 +7,12 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QSet>
|
||||
#include <QVariant>
|
||||
#include <QSet>
|
||||
|
||||
using namespace ReportManagement;
|
||||
|
||||
@@ -86,7 +85,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
{
|
||||
QStringList strList;
|
||||
strList.reserve(usedGears.size());
|
||||
for (int gearId : std::as_const(usedGears))
|
||||
for (int gearId : qAsConst(usedGears))
|
||||
strList += QString::number(gearId);
|
||||
QString gears = strList.join(QLatin1String(", "));
|
||||
stmt += QLatin1String(" AND gear_id IN (") + gears + QLatin1String(")");
|
||||
@@ -196,7 +195,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
}
|
||||
|
||||
// Now examine the remaining weapons:
|
||||
for (const participant_map2_t &p : std::as_const(m_crGear))
|
||||
for (const participant_map2_t &p : qAsConst(m_crGear))
|
||||
{
|
||||
QMap<time_t, Database::RepChargeResupplyData> temp;
|
||||
for (const QVector<Database::RepChargeResupplyData> &datas : p)
|
||||
@@ -208,7 +207,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
int p_before = temp.begin().value().participantId;
|
||||
int pt_before = temp.begin().value().participantTypeId;
|
||||
|
||||
for (const Database::RepChargeResupplyData &d : std::as_const(temp))
|
||||
for (const Database::RepChargeResupplyData &d : qAsConst(temp))
|
||||
{
|
||||
if (p_before != d.participantId)
|
||||
{
|
||||
@@ -332,7 +331,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
|
||||
|
||||
int current = start;
|
||||
for (const Database::RepChargeResupplyData &d : std::as_const(tmap)) // Per Timestamp
|
||||
for (const Database::RepChargeResupplyData &d : qAsConst(tmap)) // Per Timestamp
|
||||
{
|
||||
if (d.chargeTypeId < 0)
|
||||
{
|
||||
@@ -432,9 +431,9 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
|
||||
QMap<int/*participantTypeId*/, charge_type_map2_t> finalMap;
|
||||
|
||||
for (const charge_type_map2_t &ctmap : std::as_const(m_crResData)) // Per Participant
|
||||
for (const charge_type_map2_t &ctmap : qAsConst(m_crResData)) // Per Participant
|
||||
{
|
||||
for (const ChargeResupplyResult &res : std::as_const(ctmap)) // Per ChargeType
|
||||
for (const ChargeResupplyResult &res : qAsConst(ctmap)) // Per ChargeType
|
||||
{
|
||||
if (request.participantIds().size() > 0 && !contains(request.participantIds(), res.participantId))
|
||||
continue;
|
||||
@@ -464,9 +463,9 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq
|
||||
|
||||
DEBUG_LOG(m_logger) << "finalMap.size: " << finalMap.size();
|
||||
|
||||
for (const charge_type_map2_t &ctmap : std::as_const(finalMap))
|
||||
for (const charge_type_map2_t &ctmap : qAsConst(finalMap))
|
||||
{
|
||||
for (const ChargeResupplyResult &res : std::as_const(ctmap))
|
||||
for (const ChargeResupplyResult &res : qAsConst(ctmap))
|
||||
{
|
||||
checkElapsedTimer(timeoutTimer);
|
||||
DEBUG_LOG(m_logger) << "res.chargeTypeId: " << res.chargeTypeId;
|
||||
|
||||
+5
-4
@@ -15,10 +15,10 @@
|
||||
|
||||
#include <ProjectDataManagement/pdm.hpp>
|
||||
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QSet>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <DDS/Core/pacemaker.h>
|
||||
|
||||
using namespace ReportManagement;
|
||||
@@ -32,6 +32,7 @@ HandlerReportData::HandlerReportData(const std::shared_ptr<DdsHandler> &ddsHandl
|
||||
, m_db(db)
|
||||
, m_ppmDtc(nullptr)
|
||||
, m_aesDtc(nullptr)
|
||||
, m_logger(getLogger("HandlerReportData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
|
||||
|
||||
+5
-5
@@ -14,11 +14,11 @@
|
||||
#include "rep_db.h"
|
||||
|
||||
#include <AreaEffectSimulation/aes_dtc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
|
||||
#include <QElapsedTimer>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QObject>
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------------
|
||||
namespace ReportManagement
|
||||
@@ -192,8 +192,6 @@ class HandlerReportData final
|
||||
bool init();
|
||||
|
||||
private: // methods
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
static QString intVecToString(const std::vector<int> &intVec);
|
||||
void onCreateModifyReportRequest(const rti::core::SampleIdentity &cookie, const CreateModifyReportRequest &request) override final;
|
||||
void onRemoveReportRequest(const rti::core::SampleIdentity &cookie, const Core::RemoveElementRequest &request) override final;
|
||||
@@ -319,5 +317,7 @@ class HandlerReportData final
|
||||
|
||||
rti::core::SampleIdentity m_updateReportCookie;
|
||||
UpdateReportReply m_reply;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace ReportManagement
|
||||
+1
-2
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
@@ -65,7 +64,7 @@ bool HandlerReportData::generateFiringsResult(const CreateModifyReportRequest &r
|
||||
|
||||
QElapsedTimer timeoutTimer;
|
||||
timeoutTimer.start();
|
||||
for (const int &chargeId : std::as_const(request.chargeTypeIds()))
|
||||
for (const int &chargeId : qAsConst(request.chargeTypeIds()))
|
||||
{
|
||||
if (chargeId == 0) continue; // skip 0
|
||||
|
||||
|
||||
+6
-5
@@ -11,13 +11,13 @@
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtilsCore/dds_vector.h>
|
||||
#include <ProjectDataManagement/pdm.hpp>
|
||||
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QSet>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QSet>
|
||||
#include <ngldb/nsqlquery.h>
|
||||
|
||||
using namespace ReportManagement;
|
||||
@@ -26,6 +26,7 @@ HandlerReportGetData::HandlerReportGetData(const std::shared_ptr<DdsHandler> &dd
|
||||
: Interface::Fts::GetReportDataRequestHandler(ddsHandler->fts())
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_db(db)
|
||||
, m_logger(getLogger("HandlerReportGetData"))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -12,7 +12,7 @@
|
||||
#include "logger.h"
|
||||
#include "rep_db.h"
|
||||
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <functional>
|
||||
@@ -32,8 +32,6 @@ public:
|
||||
bool init();
|
||||
|
||||
private: // methods
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onGetReportDataRequest(const rti::core::SampleIdentity &cookie,
|
||||
const GetReportDataRequest &request) override final;
|
||||
GetReportDataReply getReportDataRequest(const GetReportDataRequest &request);
|
||||
@@ -57,7 +55,7 @@ private: // attributes
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler; ///< Pointer to DDS handler
|
||||
std::shared_ptr<DatabaseInterface> m_db;
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
};
|
||||
} // namespace ReportManagement
|
||||
|
||||
+2
-3
@@ -7,12 +7,11 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QVariant>
|
||||
|
||||
using namespace ReportManagement;
|
||||
|
||||
@@ -82,7 +81,7 @@ bool HandlerReportData::generateMaintenanceResult(const CreateModifyReportReques
|
||||
|
||||
qInsert.bindValue(QStringLiteral(":reportId"), reportId);
|
||||
|
||||
for (const auto &vrData : std::as_const(m_maintenanceData))
|
||||
for (const auto &vrData : qAsConst(m_maintenanceData))
|
||||
{
|
||||
const auto participant = ppmDtc->participant(vrData.participantId);
|
||||
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QPair>
|
||||
#include <QVariant>
|
||||
|
||||
using namespace ReportManagement;
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QVariant>
|
||||
|
||||
using namespace ReportManagement;
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <QtCore/qmath.h>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QVariant>
|
||||
|
||||
using namespace ReportManagement;
|
||||
|
||||
|
||||
+2
-3
@@ -7,13 +7,12 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QVariant>
|
||||
|
||||
using namespace ReportManagement;
|
||||
|
||||
@@ -127,7 +126,7 @@ bool HandlerReportData::generateTreatmentResult(const CreateModifyReportRequest
|
||||
|
||||
QElapsedTimer timeoutTimer;
|
||||
timeoutTimer.start();
|
||||
for (const TreatmentData &tData : std::as_const(m_treatmentData))
|
||||
for (const TreatmentData &tData : qAsConst(m_treatmentData))
|
||||
{
|
||||
checkElapsedTimer(timeoutTimer);
|
||||
const auto participant = ppmDtc->participant(tData.participantId);
|
||||
|
||||
+3
-4
@@ -7,14 +7,13 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QVariant>
|
||||
#include <QJsonDocument>
|
||||
|
||||
using namespace ReportManagement;
|
||||
|
||||
@@ -103,7 +102,7 @@ bool HandlerReportData::generateTreatmentTimelineResult(const CreateModifyReport
|
||||
|
||||
qInsert.bindValue(QStringLiteral(":reportId"), reportId);
|
||||
|
||||
for (const TreatmentTimelineData &tData : std::as_const(m_treatmentTimelineData))
|
||||
for (const TreatmentTimelineData &tData : qAsConst(m_treatmentTimelineData))
|
||||
{
|
||||
const auto participant = ppmDtc->participant(tData.participantId);
|
||||
|
||||
|
||||
+5
-6
@@ -7,15 +7,14 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
#include "rep_db.h"
|
||||
|
||||
#include <ProjectDataManagement/pdm.hpp>
|
||||
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtilsCore/dds_vector.h>
|
||||
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QSet>
|
||||
#include <QVector>
|
||||
#include <QVariant>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
@@ -99,7 +98,7 @@ bool HandlerReportData::getParticipantInitial(const QVector<int> &participantIds
|
||||
qBeforeStart.bindValue(QStringLiteral(":startTime"), startTime);
|
||||
qAfterStart.bindValue(QStringLiteral(":startTime"), startTime);
|
||||
qAfterStart.bindValue(QStringLiteral(":endTime"), endTime);
|
||||
for (int participantId : std::as_const(participantIds))
|
||||
for (int participantId : qAsConst(participantIds))
|
||||
{
|
||||
qBeforeStart.bindValue(QStringLiteral(":participant_id"), participantId);
|
||||
if (!qBeforeStart.exec())
|
||||
|
||||
+2
-3
@@ -7,12 +7,11 @@
|
||||
*/
|
||||
|
||||
#include "handler_report_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QVariant>
|
||||
|
||||
using namespace ReportManagement;
|
||||
|
||||
@@ -68,7 +67,7 @@ bool HandlerReportData::generateSanitationMaterialResult(const CreateModifyRepor
|
||||
qInsert.prepare(QLatin1String("INSERT INTO rep_sanitation_material_result (report_id, sanitation_unique_id, qualification, material_id ) VALUES (:reportId, :uqId, :qualif, :materialId )"));
|
||||
qInsert.bindValue(QLatin1String(":reportId"), reportId);
|
||||
|
||||
for (qint64 sanitationId : std::as_const(sanitationIds))
|
||||
for (qint64 sanitationId : qAsConst(sanitationIds))
|
||||
{
|
||||
qInsert.bindValue(QLatin1String(":uqId"), sanitationId);
|
||||
|
||||
|
||||
+5
-3
@@ -18,11 +18,13 @@
|
||||
namespace ReportManagement
|
||||
{
|
||||
|
||||
MainHandler::MainHandler(QObject *parent) : QObject(parent)
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_dbHandler(nullptr)
|
||||
, m_preService(nullptr),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_preService(nullptr)
|
||||
, m_logger(getLogger("MainHandlerGenerator"))
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
{
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
#include "dds_handler.h"
|
||||
#include "handler_report_data.h"
|
||||
@@ -38,13 +38,13 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DbHandler> m_dbHandler;
|
||||
std::shared_ptr<HandlerReportData> m_reportData;
|
||||
std::shared_ptr<HandlerReportGetData> m_reportGetData;
|
||||
//external
|
||||
PresentationManagement::Initialization *m_preService;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace ReportManagement
|
||||
+9
-7
@@ -10,20 +10,22 @@
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <QtCore/QSet>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QSet>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
namespace ReportManagement
|
||||
{
|
||||
ObjectReportInfo::ObjectReportInfo(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
const std::shared_ptr<DatabaseInterface> &db,
|
||||
QObject *parent) : QObject(parent)
|
||||
QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_db(db),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_db(db)
|
||||
, m_logger(getLogger("ObjectReportInfo"))
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+2
-2
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include "dds_handler.h"
|
||||
#include <Core/core_types.h>
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
|
||||
// Generated
|
||||
#include <ReportManagement/rep_db.h>
|
||||
|
||||
Reference in new issue
Block a user