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
@@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# Generate som_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcSomCommon SHARED ${SRCS_common})
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcSomCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcSomCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcSomCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcSomCommon
|
||||
ngldb
|
||||
NGLLogger
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcSomCommon)
|
||||
|
||||
#
|
||||
@@ -60,14 +58,13 @@ SET(SRCS_client
|
||||
# generate som_[d|f]tc.h, som_[d|f]tc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcSomClient SHARED ${SRCS_client})
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcSomClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcSomClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcSomClient
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcSomClient
|
||||
svcSomCommon
|
||||
ddsftc
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcSomClient)
|
||||
|
||||
#
|
||||
@@ -89,14 +85,13 @@ SET(SRCS_server
|
||||
# generate som_[d|f]ts.h, som_[d|f]ts_impl.[cpp|h]
|
||||
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV svcSomServer SHARED ${SRCS_server})
|
||||
NGL_ADD_LIBRARY(AAR SV svcSomServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcSomServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcSomServer
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -106,7 +101,6 @@ NGL_TARGET_LINK_LIBRARIES(svcSomServer
|
||||
PUBLIC
|
||||
svcSomCommon
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcSomServer)
|
||||
|
||||
#
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace SoundManagement
|
||||
|
||||
DdsHandler::DdsHandler(int domainId, int exerciseId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
#include <DDS/Core/core_dtc.h>
|
||||
#include <DDS/Core/topic_lock_master.h>
|
||||
@@ -49,7 +49,6 @@ public:
|
||||
qint64 currentPartitionTime() const;
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<Core::Interface::Dtc> m_dtcCore;
|
||||
std::shared_ptr<Core::Pacemaker> m_pacemaker;
|
||||
@@ -60,6 +59,8 @@ private:
|
||||
std::shared_ptr<SoundManagement::Interface::Dts> m_dtsSom; ///< Pointer to DTS SoundManagement interface object
|
||||
std::shared_ptr<SoundManagement::Interface::Dtc> m_dtcSom; ///< Pointer to DTC SoundManagement interface object
|
||||
std::shared_ptr<SoundManagement::Interface::Fts> m_ftsSom; ///< Pointer to FTS SoundManagement interface object
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -7,15 +7,14 @@
|
||||
*/
|
||||
|
||||
#include "handler_sounds.h"
|
||||
#include <utility>
|
||||
#include "settings.h"
|
||||
#include "dds_handler.h"
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonValue>
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonValue>
|
||||
#include <QSet>
|
||||
#include <QTimer>
|
||||
#include <QNetworkReply>
|
||||
#include <LtsUtilsCore/json_object.h>
|
||||
|
||||
namespace SoundManagement
|
||||
@@ -31,6 +30,7 @@ HandlerSounds::HandlerSounds(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
, ControlSoundRequestHandler(ddsHandler->ftsSom())
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_dbHandler(dbHandler)
|
||||
, m_logger(getLogger("HandlerSounds"))
|
||||
{
|
||||
|
||||
} // end of ctor()
|
||||
@@ -63,7 +63,7 @@ bool HandlerSounds::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const Database::SomSound &data : std::as_const(soundVec))
|
||||
for (const Database::SomSound &data : qAsConst(soundVec))
|
||||
{
|
||||
static int index = 0;
|
||||
DEBUG_LOG(m_logger) << "SomSound from DB data: id=" << data.id
|
||||
@@ -632,7 +632,7 @@ int HandlerSounds::getAssetId(const QString &hostName)
|
||||
|
||||
int HandlerSounds::getSoundIndex(const SoundCategory &category, const QString &name)
|
||||
{
|
||||
for (const SoundStr &soundName: std::as_const(m_soundNames))
|
||||
for (const SoundStr &soundName: qAsConst(m_soundNames))
|
||||
if ((category == soundName.category) && (name == soundName.name))
|
||||
return soundName.index;
|
||||
return -1;
|
||||
@@ -640,7 +640,7 @@ int HandlerSounds::getSoundIndex(const SoundCategory &category, const QString &n
|
||||
|
||||
int HandlerSounds::getDuration(const SoundManagement::SoundCategory& category,const int soundId)
|
||||
{
|
||||
for (const SoundStr &soundName: std::as_const(m_soundNames))
|
||||
for (const SoundStr &soundName: qAsConst(m_soundNames))
|
||||
{
|
||||
if ( soundId == soundName.soundId
|
||||
&& category == soundName.category)
|
||||
@@ -682,7 +682,7 @@ void HandlerSounds::handleSoundReport(const QString &json, const QString &host)
|
||||
// TODO Pruefen, ob in der lokalen Verwaltung noch Sounds sind, die geloescht und vom DDS-Bus genommen
|
||||
// werden muessen.
|
||||
|
||||
for (const QJsonValue &valSound : std::as_const(sounds))
|
||||
for (const QJsonValue &valSound : qAsConst(sounds))
|
||||
{
|
||||
const QJsonObject &sound = valSound.toObject();
|
||||
bool found = false;
|
||||
@@ -705,7 +705,7 @@ void HandlerSounds::handleSoundReport(const QString &json, const QString &host)
|
||||
<< " soundId=" << soundId
|
||||
<< " time=" << soundState.sampleTime();
|
||||
|
||||
for (const SoundManagement::SoundState& item : std::as_const(m_soundStates))
|
||||
for (const SoundManagement::SoundState& item : qAsConst(m_soundStates))
|
||||
{
|
||||
if ( (item.egcuId() == soundState.egcuId()) &&
|
||||
(item.category() == soundState.category()) &&
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
#include <som_db.h>
|
||||
@@ -20,8 +20,8 @@
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
// HTTP Request
|
||||
#include <QtNetwork/QNetworkAccessManager>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QTimer>
|
||||
#include <QEventLoop>
|
||||
|
||||
|
||||
@@ -72,8 +72,6 @@ private Q_SLOTS:
|
||||
|
||||
private: // methods
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QString httpFinishedBlocking(QNetworkReply *reply);
|
||||
|
||||
void onGetActiveSoundsRequest(const rti::core::SampleIdentity &cookie,
|
||||
@@ -134,5 +132,6 @@ private: // attributes
|
||||
QVector<SoundState> m_soundStates{QVector<SoundManagement::SoundState>()};
|
||||
int m_topicId{0};
|
||||
QHash <int, int> m_mountingPointAsset; // Key= structureElementId, value= assetId
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace SoundManagement
|
||||
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "svcsomcommon_export.h"
|
||||
#include "som_export.h"
|
||||
|
||||
namespace SoundManagement
|
||||
{
|
||||
|
||||
@@ -14,15 +14,17 @@
|
||||
#include "som_db.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QFileInfo>
|
||||
|
||||
namespace SoundManagement
|
||||
{
|
||||
|
||||
MainHandler::MainHandler(QObject *parent) : QObject(parent)
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_dbHandler(nullptr),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_dbHandler(nullptr)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
#include "dds_handler.h"
|
||||
#include "handler_sounds.h"
|
||||
@@ -39,10 +39,12 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DbHandler> m_dbHandler;
|
||||
|
||||
std::shared_ptr<HandlerSounds> m_handlerSounds;
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace SoundManagement
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user