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
+9
-9
@@ -7,7 +7,6 @@
|
||||
* Created by Hannes Baeuerle, SLSE, 2016-07-27
|
||||
*/
|
||||
#include "template_handler.h"
|
||||
#include <utility>
|
||||
#include "template.h"
|
||||
#include "main_handler.h"
|
||||
#include <TypeHandling/type_donator.h>
|
||||
@@ -24,6 +23,7 @@ namespace TemplateHandling
|
||||
TemplateHandler::TemplateHandler(MainHandler *mainHandler)
|
||||
: Interface::Fts::ModifyTemplateDataRequestHandler(mainHandler->exerciseId() <= 0 ? mainHandler->fts() : nullptr)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("TemplateHandler"))
|
||||
{}
|
||||
|
||||
TemplateHandler::~TemplateHandler()
|
||||
@@ -114,7 +114,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
futureVec += fut;
|
||||
}
|
||||
|
||||
for (const QFuture<Core::FunctionReplyObject> ¤tFut : std::as_const(futureVec))
|
||||
for (const QFuture<Core::FunctionReplyObject> ¤tFut : qAsConst(futureVec))
|
||||
{
|
||||
Core::FunctionReplyObject ret = currentFut.result();
|
||||
if (ret.error())
|
||||
@@ -123,7 +123,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const ParticipantManagement::TemplateData ¤tTemplate : std::as_const(templatesToBeCreatedOrModified))
|
||||
for (const ParticipantManagement::TemplateData ¤tTemplate : qAsConst(templatesToBeCreatedOrModified))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Validating template: " << currentTemplate;
|
||||
auto ret = validateTemplateData(templatesToBeCreatedOrModified, modIdToTemplateId, currentTemplate);
|
||||
@@ -139,7 +139,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
// create new and update existing templates
|
||||
DEBUG_LOG(m_logger) << "Creating new and updating existing templates ...";
|
||||
|
||||
for (const TemplateData ¤tData : std::as_const(templatesToBeCreatedOrModified))
|
||||
for (const TemplateData ¤tData : qAsConst(templatesToBeCreatedOrModified))
|
||||
{
|
||||
Template *templateToUpdate = m_templates.value(modIdToTemplateId.value(currentData.modId()));
|
||||
if (!templateToUpdate)
|
||||
@@ -164,7 +164,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
DEBUG_LOG(m_logger) << "New templates created and existing templates updated";
|
||||
|
||||
// build hierarchy
|
||||
for (const TemplateData ¤tData : std::as_const(templatesToBeCreatedOrModified)) // first set superiorIds
|
||||
for (const TemplateData ¤tData : qAsConst(templatesToBeCreatedOrModified)) // first set superiorIds
|
||||
{
|
||||
Template *templateToUpdate = m_templates.value(modIdToTemplateId.value(currentData.modId()), nullptr);
|
||||
const int superiorId = modIdToTemplateId.value(currentData.superiorModId());
|
||||
@@ -174,7 +174,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
templatesWithChanges.append(templateToUpdate);
|
||||
}
|
||||
|
||||
for (Template *currentTemplate : std::as_const(m_templates)) // set inferiorIds
|
||||
for (Template *currentTemplate : qAsConst(m_templates)) // set inferiorIds
|
||||
{
|
||||
if (!currentTemplate->hasNewInferiorStructure(inferiorIdsForTemplate(currentTemplate->id())) ||
|
||||
templatesWithChanges.contains(currentTemplate))
|
||||
@@ -184,7 +184,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
}
|
||||
|
||||
// update in Database
|
||||
for (Template *currentTemplate : std::as_const(templatesWithChanges))
|
||||
for (Template *currentTemplate : qAsConst(templatesWithChanges))
|
||||
{
|
||||
if (!m_mainHandler->db()->update(currentTemplate->dbEntry()))
|
||||
return Core::FunctionReplyObject(tr_lts("dds", "Could not update template data in database, template data may be inconsistent"));
|
||||
@@ -192,7 +192,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti
|
||||
trans.commit();
|
||||
|
||||
// finally ... publish template data via dds if no error occured
|
||||
for (Template *currentTemplate : std::as_const(templatesWithChanges))
|
||||
for (Template *currentTemplate : qAsConst(templatesWithChanges))
|
||||
m_mainHandler->exAnyDts()->publish(currentTemplate->toDdsTemplateParticipant());
|
||||
|
||||
return Core::FunctionReplyObject();
|
||||
@@ -203,7 +203,7 @@ std::vector<int32_t> TemplateHandler::inferiorIdsForTemplate(int32_t superiorTem
|
||||
std::vector<int32_t> result;
|
||||
result.reserve(10);
|
||||
|
||||
for (Template *currentTemplate : std::as_const(m_templates))
|
||||
for (Template *currentTemplate : qAsConst(m_templates))
|
||||
{
|
||||
if (currentTemplate->superiorId() == superiorTemplateId)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user