fix Warning

This commit is contained in:
berrux-dev committed 2026-10-03 09:20:13 +02:00
1 parent 593c221d23
commit 8345470273
316 files changed
+1246 -929

No files matched your search

@@ -7,6 +7,7 @@
*/
#include "group.h"
#include <utility>
#include <QtCore/QDateTime>
#include <QtCore/QThread>
@@ -52,7 +53,7 @@ Group::Group(const std::shared_ptr<DdsHandler> &ddsHandler,
Group::~Group()
{
setRunningState(Core::RunningState::StoppedNormally);
for (ServiceProcess *serviceProc :qAsConst(m_serviceProcs))
for (ServiceProcess *serviceProc :std::as_const(m_serviceProcs))
m_ddsHandler->dts()->removeServiceInformationByKey(serviceProc->serviceProcessId());
qDeleteAll(m_serviceProcs); // in Service they are removed via ServiceProcess::destroyed signal
m_ddsHandler->dts()->removeGroupInformationByKey(m_groupId);
@@ -60,7 +61,7 @@ Group::~Group()
void Group::init()
{
for (int serviceId : qAsConst(m_scheme->services))
for (int serviceId : std::as_const(m_scheme->services))
{
if (m_serviceProcs.contains(serviceId))
continue;
@@ -92,11 +93,11 @@ bool Group::setRunningState(Core::RunningState newState)
case Core::RunningState::Starting:
// make sure all services are there
init();
for (ServiceProcess *serviceProc : qAsConst(m_serviceProcs))
for (ServiceProcess *serviceProc : std::as_const(m_serviceProcs))
serviceProc->start();
return true;
case Core::RunningState::StoppedNormally:
for (ServiceProcess *serviceProc : qAsConst(m_serviceProcs))
for (ServiceProcess *serviceProc : std::as_const(m_serviceProcs))
serviceProc->terminate();
return true;
default:
@@ -118,7 +119,7 @@ void Group::startCore()
init();
// ExerciseManagement must be started ...
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
{
if (proc->serviceName() == QLatin1String("ExerciseManagement"))
{
@@ -160,7 +161,7 @@ void Group::start()
// make sure all services are there
init();
// get list of prio
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
{
if ( !prioList.contains(proc->prio()))
{
@@ -176,7 +177,7 @@ void Group::start()
// m_actPrio = getNextPrio(prioList);
//}
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
{
if ( m_actPrio == proc->prio())
{
@@ -198,7 +199,7 @@ void Group::start()
void Group::stop()
{
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
{
if (proc->state() != QProcess::NotRunning)
proc->stopFromRequest();
@@ -209,7 +210,7 @@ void Group::restart()
{
// make sure all services are there
init();
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
proc->restart();
}
@@ -269,7 +270,7 @@ void Group::onNewServiceInfo()
m_elapsedTimer.start();
std::vector<int32_t> serviceIds;
serviceIds.reserve(m_serviceProcs.size());
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
serviceIds.push_back(proc->serviceProcessId());
GroupInformation info(m_groupId,
@@ -297,7 +298,7 @@ void Group::onCompleteCoreTick()
ServiceProcess *exmProc = nullptr;
// get EXM proc
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
{
if (proc->serviceName() == QLatin1String("ExerciseManagement"))
{
@@ -315,7 +316,7 @@ void Group::onCompleteCoreTick()
if (exmProc->runningState() == Core::RunningState::Running)
{
// get list of prio
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
{
if ( !prioList.contains(proc->prio()))
{
@@ -327,7 +328,7 @@ void Group::onCompleteCoreTick()
}
// start rest of group core
for (ServiceProcess *proc : qAsConst(m_serviceProcs))
for (ServiceProcess *proc : std::as_const(m_serviceProcs))
{
if (proc->state() != QProcess::Running && proc->prio() == m_actPrio)
{
@@ -352,7 +353,7 @@ void Group::onCompleteCoreTick()
ServiceProcess *Group::procFromPid(qint64 pid)
{
for (ServiceProcess *proc :qAsConst(m_serviceProcs))
for (ServiceProcess *proc :std::as_const(m_serviceProcs))
{
if (proc->processId() == pid)
return proc;