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 +8,6 @@
|
||||
*/
|
||||
|
||||
#include "cnr_handler.h"
|
||||
#include <utility>
|
||||
#include "avm_dts.h"
|
||||
#include "dds_handler.h"
|
||||
#include "exercise_context.h"
|
||||
@@ -20,7 +19,7 @@
|
||||
#include <InfrastructureManagement/ism_dtc.h>
|
||||
#include <LtsUtilsCore/json_object.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QStringList>
|
||||
#include <algorithm>
|
||||
|
||||
namespace AudioVideoManagement
|
||||
@@ -178,6 +177,7 @@ private:
|
||||
CnrHandler *m_handler;
|
||||
DatabaseInterface *m_db;
|
||||
QHash<int32_t, Database::AvmDeviceConfig> m_cache; //!< cnrConfig-Id -> AvmDeviceConfig
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@ CnrHandler::CnrHandler(Interface::Dts *dts, Interface::Fts *fts, InfrastructureM
|
||||
, m_frequencyPlanningHandler(frequencyPlanningHandler)
|
||||
, m_db(db)
|
||||
, m_activeExercises(activeExercises)
|
||||
, m_logger(getLogger("CombatNetRadioHandler"))
|
||||
, m_deviceConfig(new DeviceConfig(this, db, m_logger))
|
||||
{
|
||||
Q_ASSERT(dts);
|
||||
@@ -234,7 +235,7 @@ bool CnrHandler::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const AvmCnrChannel ¤tChannel : std::as_const(m_channels))
|
||||
for (const AvmCnrChannel ¤tChannel : qAsConst(m_channels))
|
||||
m_dts->publish(::AudioVideoManagement::toDds(currentChannel));
|
||||
|
||||
// Don't use select with callback here as addConfig() uses the DB, too.
|
||||
@@ -245,7 +246,7 @@ bool CnrHandler::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const AvmCnrConfig ¤tConfig : std::as_const(cnrConfigs))
|
||||
for (const AvmCnrConfig ¤tConfig : qAsConst(cnrConfigs))
|
||||
{
|
||||
auto reply = createCnrConfig(toRequest(currentConfig, 0), currentConfig.id);
|
||||
if (reply.error())
|
||||
@@ -398,7 +399,7 @@ void CnrHandler::updateDeviceConfig()
|
||||
{
|
||||
DBTransaction trans(m_db->database());
|
||||
|
||||
for (const auto &config : std::as_const(m_cache))
|
||||
for (const auto &config : qAsConst(m_cache))
|
||||
if (config.isActive())
|
||||
m_deviceConfig->update(config);
|
||||
|
||||
@@ -480,7 +481,7 @@ Core::FunctionReplyObject CnrHandler::validateRequest(const ModifyCnrConfigReque
|
||||
*/
|
||||
bool CnrHandler::checkConstraint(const std::function<bool (const CnrConfig &)> &constraint, const boost::optional<int> &exerciseId, const boost::optional<int32_t> &excludeId) const
|
||||
{
|
||||
for (const CnrConfig &config : std::as_const(m_cache))
|
||||
for (const CnrConfig &config : qAsConst(m_cache))
|
||||
{
|
||||
if (excludeId == config.id())
|
||||
continue;
|
||||
@@ -706,7 +707,7 @@ QString CnrHandler::exerciseList(const CnrConfig &config) const
|
||||
|
||||
// Global - all active exercises, no matter if they have active plannings or not
|
||||
QStringList exerciseList;
|
||||
for (const auto &context : std::as_const(m_activeExercises->allContexts()))
|
||||
for (const auto &context : qAsConst(m_activeExercises->allContexts()))
|
||||
exerciseList.append(context.toString());
|
||||
return exerciseList.join(QLatin1Char(','));
|
||||
}
|
||||
@@ -743,7 +744,7 @@ int CnrHandler::normalizedAddacChannel(int addacChannel) const
|
||||
|
||||
Database::AvmCnrChannel CnrHandler::channelById(int32_t id) const
|
||||
{
|
||||
for (const Database::AvmCnrChannel &channel : std::as_const(m_channels))
|
||||
for (const Database::AvmCnrChannel &channel : qAsConst(m_channels))
|
||||
if (channel.id == id)
|
||||
return channel;
|
||||
|
||||
|
||||
Reference in new issue
Block a user