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
+19
-19
@@ -7,21 +7,20 @@
|
||||
*/
|
||||
|
||||
#include "handler_exercise.h"
|
||||
#include <utility>
|
||||
#include "exm_db.h"
|
||||
#include "handler_exercise_phase.h"
|
||||
#include "main_handler.h"
|
||||
#include "object_exercise.h"
|
||||
#include "settings.h"
|
||||
|
||||
//#include <QtGui/QPixmap>
|
||||
#include <QtCore/QTimer>
|
||||
//#include <QPixmap>
|
||||
#include <QTimer>
|
||||
#include <vector>
|
||||
|
||||
#include <LtsUtils/dds_vector_to_pixmap.h>
|
||||
#include <LtsUtilsCore/dds_vector_to_pixmap.h>
|
||||
#include <DBAdministration/exercise_table_generator.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtilsCore/dds_vector.h>
|
||||
|
||||
namespace ExerciseManagement
|
||||
{
|
||||
@@ -42,6 +41,7 @@ HandlerExercise::HandlerExercise(MainHandler *mainHandler,
|
||||
, m_db(db)
|
||||
, m_exTblGen(exTableGenerator)
|
||||
, m_startupExerciseTimer(new QTimer(this))
|
||||
, m_logger(getLogger("HandlerExercise"))
|
||||
{
|
||||
//m_imageCache.setMaxCost(15);
|
||||
m_startupExerciseTimer->setSingleShot(false);
|
||||
@@ -70,7 +70,7 @@ bool HandlerExercise::init()
|
||||
QVector<QPair<int, ExerciseState>> exerciseStates;
|
||||
exerciseStates.reserve(dataVec.size());
|
||||
// create exercise objects
|
||||
for (const Database::ExmExercise &data : std::as_const(dataVec))
|
||||
for (const Database::ExmExercise &data : qAsConst(dataVec))
|
||||
{
|
||||
ObjectExercise *ifs(new ObjectExercise(m_ddsHandler, m_db, m_exTblGen, this));
|
||||
Core::FunctionReplyObject ret = ifs->createObject(data);
|
||||
@@ -106,7 +106,7 @@ bool HandlerExercise::init()
|
||||
return a.first < b.first;
|
||||
});
|
||||
|
||||
for (const auto &p : std::as_const(exerciseStates))
|
||||
for (const auto &p : qAsConst(exerciseStates))
|
||||
m_exercisesToStart.enqueue(p.first);
|
||||
m_startupExerciseTimer->start();
|
||||
|
||||
@@ -211,7 +211,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseCreateRequest(const ExerciseC
|
||||
|
||||
int iCnt = 0;
|
||||
QSet<int> linkedExerciseIds;
|
||||
for (const ObjectExercise *ex : std::as_const(m_exeObjMap))
|
||||
for (const ObjectExercise *ex : qAsConst(m_exeObjMap))
|
||||
{
|
||||
const auto state = ex->exerciseState();
|
||||
|
||||
@@ -313,7 +313,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
int iCntRunningExercises = 0;
|
||||
QSet<int> linkedExerciseIds;
|
||||
|
||||
for (const ObjectExercise *ex : std::as_const(m_exeObjMap))
|
||||
for (const ObjectExercise *ex : qAsConst(m_exeObjMap))
|
||||
{
|
||||
const auto state = ex->exerciseState();
|
||||
|
||||
@@ -350,7 +350,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
if (request.newState() == ExerciseState::Stopped)
|
||||
{
|
||||
int iCnt = 0;
|
||||
for (const ObjectExercise *ex : std::as_const(m_exeObjMap))
|
||||
for (const ObjectExercise *ex : qAsConst(m_exeObjMap))
|
||||
{
|
||||
const auto state = ex->exerciseState();
|
||||
if (ex->id() != request.id() && state == ExerciseState::Stopped)
|
||||
@@ -365,7 +365,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM
|
||||
request.newState() == ExerciseState::Paused))
|
||||
{
|
||||
int iCnt = 0;
|
||||
for (const ObjectExercise *ex : std::as_const(m_exeObjMap))
|
||||
for (const ObjectExercise *ex : qAsConst(m_exeObjMap))
|
||||
{
|
||||
if (ex->id() != request.id() && ex->data().hasHlaInterface && (ex->exerciseState() == ExerciseState::Started ||
|
||||
ex->exerciseState() == ExerciseState::Paused))
|
||||
@@ -663,7 +663,7 @@ void HandlerExercise::onStartGroupReply(const Core::FunctionReplyObject &replyOb
|
||||
|
||||
bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStarted, QString &mesgOut)
|
||||
{
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO <<" START, exerciseIdTobeStarted: " << exerciseIdToBeStarted;
|
||||
INFO_LOG(m_logger) << LOGFUNCTION <<" START, exerciseIdTobeStarted: " << exerciseIdToBeStarted;
|
||||
|
||||
// only one exercise, about to start
|
||||
if (m_exeObjMap.size() <= 1)
|
||||
@@ -684,7 +684,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar
|
||||
|
||||
if (!ppmDtcForEx)
|
||||
{
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " no ppmDtcForEx (" << exerciseIdToBeStarted << ")";
|
||||
WARNING_LOG(m_logger) << LOGFUNCTION << " no ppmDtcForEx (" << exerciseIdToBeStarted << ")";
|
||||
return true;
|
||||
}
|
||||
ppmDtcForEx->enableParticipant();
|
||||
@@ -704,7 +704,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> ppmDtc = m_ddsHandler->ppmDtc();
|
||||
if (!ppmDtc)
|
||||
{
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " no ppmDtc";
|
||||
WARNING_LOG(m_logger) << LOGFUNCTION << " no ppmDtc";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -723,17 +723,17 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar
|
||||
ObjectExercise *ifs = m_exeObjMap.value(exerciseId);
|
||||
if (!ifs)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Exercise not found, exId = " << exerciseId;
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " Exercise not found, exId = " << exerciseId;
|
||||
return;
|
||||
}
|
||||
if ((ifs->exerciseState() == ExerciseState::Started) ||
|
||||
(ifs->exerciseState() == ExerciseState::Paused))
|
||||
{
|
||||
const std::vector<ParticipantManagement::Equipment2ParticipantId> &mapping = equipmentExerciseMapping.mapping();
|
||||
for (const auto &eq2p : std::as_const(mapping))
|
||||
for (const auto &eq2p : qAsConst(mapping))
|
||||
if (eqNoForEx.contains(eq2p.equipmentNumber()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " !!! eq = " << eq2p.equipmentNumber() << " is already used in exercise =" << exerciseId;
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " !!! eq = " << eq2p.equipmentNumber() << " is already used in exercise =" << exerciseId;
|
||||
usedEqNumbers[exerciseId].insert(eq2p.equipmentNumber());
|
||||
}
|
||||
}
|
||||
@@ -767,7 +767,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar
|
||||
}
|
||||
} // while
|
||||
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " state change request not allowed: mesgOut:" << mesgOut;
|
||||
WARNING_LOG(m_logger) << LOGFUNCTION << " state change request not allowed: mesgOut:" << mesgOut;
|
||||
|
||||
// limit length:
|
||||
if (mesgOut.size()>200)
|
||||
@@ -811,7 +811,7 @@ QStringList HandlerExercise::doubleChannels(int exerciseAId, int exerciseBId) co
|
||||
|
||||
doubleChannelNames.reserve(exerciseAChannelIds.size());
|
||||
|
||||
for (int exerciseAChannelId : std::as_const(exerciseAChannelIds))
|
||||
for (int exerciseAChannelId : qAsConst(exerciseAChannelIds))
|
||||
{
|
||||
if (exerciseBChannelIds.contains(exerciseAChannelId))
|
||||
doubleChannelNames.append(QString::fromStdString(m_ddsHandler->avmDtc()->cnrChannel(exerciseAChannelId).name()));
|
||||
|
||||
Reference in new issue
Block a user