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
+8
-7
@@ -7,20 +7,21 @@
|
||||
*/
|
||||
|
||||
#include "handler_dynamic_participant_data.h"
|
||||
#include <utility>
|
||||
#include "rep_db.h"
|
||||
#include "settings.h"
|
||||
#include <ngldb/nsqlquery.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QJsonDocument>
|
||||
#include <ProjectDataManagement/pdm_translation.h>
|
||||
|
||||
using namespace ReportManagement;
|
||||
//-----------------------------------------------------------------------------
|
||||
HandlerDynamicParticipantData::HandlerDynamicParticipantData(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
const std::shared_ptr<DatabaseInterface> &db) : m_ddsHandler(ddsHandler)
|
||||
, m_db(db),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
const std::shared_ptr<DatabaseInterface> &db)
|
||||
: m_ddsHandler(ddsHandler)
|
||||
, m_db(db)
|
||||
, m_logger(getLogger("HandlerDynamicParticipantData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -914,7 +915,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
}
|
||||
|
||||
// Has Turm/Wanne Map been filled?
|
||||
for (Database::RepChargeResupplyData turmWanneCrData : std::as_const(turmWanneMap))
|
||||
for (Database::RepChargeResupplyData turmWanneCrData : qAsConst(turmWanneMap))
|
||||
{
|
||||
QPair<int, int> pair;
|
||||
pair.first = turmWanneCrData.gearTypeId;
|
||||
@@ -973,7 +974,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
|
||||
|
||||
DEBUG_LOG(m_logger) << "Qualification = " << sanData.qualification;
|
||||
|
||||
for ( ParticipantManagement::SanitationMaterial sanMat : std::as_const(data.sanitationMaterialStock()))
|
||||
for ( ParticipantManagement::SanitationMaterial sanMat : qAsConst(data.sanitationMaterialStock()))
|
||||
{
|
||||
sanData.materialId = sanMat.materialId();
|
||||
sanData.materialAmount = sanMat.materialCount();
|
||||
|
||||
+3
-3
@@ -12,7 +12,7 @@
|
||||
#include "rep_db.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <AreaEffectSimulation/aes_dtc.h>
|
||||
#ifdef GUEZ_MODE
|
||||
#include <GuezIedManagement/gim_dtc.h>
|
||||
@@ -21,8 +21,8 @@
|
||||
#include <Proxies/Buildings/bld_dtc.h>
|
||||
#include <Proxies/Buildings/bld.hpp>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QMap>
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
|
||||
namespace ReportManagement
|
||||
{
|
||||
|
||||
+5
-3
@@ -15,11 +15,13 @@
|
||||
namespace ReportManagement
|
||||
{
|
||||
|
||||
MainHandler::MainHandler(QObject *parent) : QObject(parent)
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_dbHandler(nullptr)
|
||||
, m_dynPartData(nullptr),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_dynPartData(nullptr)
|
||||
, m_logger(getLogger("MainHandlerAnalyzer"))
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
{
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
#include "dds_handler.h"
|
||||
#include "handler_dynamic_participant_data.h"
|
||||
@@ -32,10 +32,10 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DbHandler> m_dbHandler;
|
||||
std::shared_ptr<HandlerDynamicParticipantData> m_dynPartData;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace ReportManagement
|
||||
@@ -30,13 +30,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# generate rep_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcRepCommon SHARED ${SRCS_common})
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcRepCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcRepCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcRepCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcRepCommon
|
||||
svcPdmCommon
|
||||
LtsUtilsCoreHeaderOnly
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcRepCommon)
|
||||
|
||||
#
|
||||
@@ -60,14 +58,13 @@ SET(SRCS_client
|
||||
# generate rep_[d|f]tc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcRepClient SHARED ${SRCS_client})
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcRepClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcRepClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcRepClient
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcRepClient
|
||||
svcRepCommon
|
||||
ddsftc
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcRepClient)
|
||||
|
||||
#
|
||||
@@ -88,14 +84,13 @@ SET(SRCS_server
|
||||
# generate rep_[d|f]ts.h, rep_[d|f]ts_impl.[cpp|h]
|
||||
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV svcRepServer SHARED ${SRCS_server})
|
||||
NGL_ADD_LIBRARY(AAR SV svcRepServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcRepServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcRepServer
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -105,7 +100,6 @@ NGL_TARGET_LINK_LIBRARIES(svcRepServer
|
||||
svcRepCommon
|
||||
ngldb
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcRepServer)
|
||||
|
||||
#
|
||||
@@ -119,7 +113,7 @@ CREATE_TOPIC_TYPE_PLUGIN(${xml_FILE})
|
||||
#
|
||||
# Generate rep.sql, rep.xml
|
||||
CODEGEN_SQL(SHARED_SRCS_exe ${xml_FILE})
|
||||
NGL_ADD_LIBRARY2(AAR SV svcRepCommonExecutable STATIC ${SHARED_SRCS_exe})
|
||||
NGL_ADD_LIBRARY(AAR SV svcRepCommonExecutable STATIC ${SHARED_SRCS_exe})
|
||||
NGL_TARGET_LINK_LIBRARIES(svcRepCommonExecutable
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
|
||||
+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>
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtTest/QTest>
|
||||
#include <QTimer>
|
||||
#include <QTest>
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
+4
-3
@@ -10,12 +10,12 @@
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCommandLineParser/LtsCommandLineParser.h>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtTest/QTest>
|
||||
#include <QTimer>
|
||||
#include <QTest>
|
||||
|
||||
#include <ReportManagement/rep_dtc.h>
|
||||
#include <ReportManagement/rep_ftc.h>
|
||||
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtilsCore/dds_vector.h>
|
||||
#include <ngldb/db_service_handler.h>
|
||||
#include <ReportManagement/settings.h>
|
||||
#include <nglsettings/nglsettings_settings.h>
|
||||
@@ -30,6 +30,7 @@ RepTests::RepTests(QObject *parent)
|
||||
, m_reportId(0)
|
||||
, m_operatorId(100)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_logger(getLogger("Test"))
|
||||
{
|
||||
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace ReportManagement
|
||||
DdsHandler::DdsHandler(int domainId, int exerciseId)
|
||||
: QObject()
|
||||
, m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
@@ -57,12 +57,13 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<Core::Pacemaker> m_pacemaker;
|
||||
std::shared_ptr<Core::TopicLockMaster> m_topicLockMaster;
|
||||
std::shared_ptr<ReportManagement::Interface::Dts> m_ddsDts;
|
||||
std::shared_ptr<ReportManagement::Interface::Fts> m_ddsFts;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "svcrepcommon_export.h"
|
||||
#include "rep_export.h"
|
||||
|
||||
namespace ReportManagement
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user