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
@@ -30,13 +30,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# Generate nme_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcNmeCommon SHARED ${SRCS_common})
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcNmeCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcNmeCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcNmeCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -45,7 +44,6 @@ NGL_TARGET_LINK_LIBRARIES(svcNmeCommon
|
||||
ddscore
|
||||
NGLLogger
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcNmeCommon)
|
||||
|
||||
#
|
||||
@@ -57,14 +55,13 @@ SET(SRCS_client
|
||||
# generate nme_[d|f]tc.h, nme_[d|f]tc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcNmeClient SHARED ${SRCS_client})
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcNmeClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcNmeClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcNmeClient
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -73,7 +70,6 @@ NGL_TARGET_LINK_LIBRARIES(svcNmeClient
|
||||
svcNmeCommon
|
||||
ddsftc
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcNmeClient)
|
||||
|
||||
#
|
||||
@@ -87,14 +83,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
# Generate nme_db_impl.cpp/.h, nme_db.h
|
||||
CODEGEN_DATABASE(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV svcNmeServer SHARED ${SRCS_server})
|
||||
NGL_ADD_LIBRARY(AAR SV svcNmeServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcNmeServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcNmeServer
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -104,7 +99,6 @@ NGL_TARGET_LINK_LIBRARIES(svcNmeServer
|
||||
PUBLIC
|
||||
svcNmeCommon
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcNmeServer)
|
||||
|
||||
#
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace NmeaManagement
|
||||
|
||||
DdsHandler::DdsHandler(int domainId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Any))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") 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_dts_types.h>
|
||||
#include <DDS/Core/core_dtc.h>
|
||||
@@ -44,12 +44,13 @@ public:
|
||||
std::shared_ptr<NmeaManagement::Interface::Fts> fts() const { return m_ddsFts;}
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<DTS::CurrentRunningState> m_dtsCurrentRunningState;
|
||||
std::shared_ptr<Core::Pacemaker> m_pacemaker;
|
||||
std::shared_ptr<NmeaManagement::Interface::Dts> m_ddsDts;
|
||||
std::shared_ptr<NmeaManagement::Interface::Fts> m_ddsFts;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace NmeaManagement
|
||||
@@ -10,7 +10,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "svcnmecommon_export.h"
|
||||
#include "nme_export.h"
|
||||
|
||||
namespace NmeaManagement
|
||||
{
|
||||
|
||||
@@ -14,8 +14,10 @@
|
||||
namespace NmeaManagement
|
||||
{
|
||||
|
||||
MainHandler::MainHandler(QObject *parent) : QObject(parent),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include <memory>
|
||||
#include "dds_handler.h"
|
||||
#include "socket_handler.h"
|
||||
@@ -29,9 +29,10 @@ public:
|
||||
std::shared_ptr<DdsHandler> dds() const { return m_ddsHandler; }
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<SocketHandler> m_socketHandler;
|
||||
std::shared_ptr<NmeaHandler> m_nmeaHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
} // namespace NmeaManagement
|
||||
@@ -5,9 +5,8 @@
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, SLTE, 2022-06-09
|
||||
*/
|
||||
#include <QtCore/QTime>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QRegularExpression>
|
||||
#include <QTime>
|
||||
#include <QDateTime>
|
||||
#include "nmea_handler.h"
|
||||
namespace NmeaManagement
|
||||
{
|
||||
@@ -15,6 +14,7 @@ NmeaHandler::NmeaHandler(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_logger(getLogger("NmeaHandler"))
|
||||
{
|
||||
|
||||
}
|
||||
@@ -64,7 +64,7 @@ void NmeaHandler::IIXDR(QString package)
|
||||
|
||||
NmeaManagement::BatteryState batteryState;
|
||||
NmeaManagement::ServiceControl serviceControl;
|
||||
QRegularExpression sep(QStringLiteral("(\\,|\\*)"));
|
||||
QRegExp sep(QStringLiteral("(\\,|\\*)"));
|
||||
QStringList pkt_data = package.split(sep);
|
||||
INFO_LOG(m_logger) << "----------------------------------------------------";
|
||||
INFO_LOG(m_logger) << "batteryState pkt_data.size=" << pkt_data.size();
|
||||
@@ -185,7 +185,7 @@ qint64 NmeaHandler::getDateTime(QString receivedTimeStr)
|
||||
void NmeaHandler::IIALR(QString package)
|
||||
{
|
||||
NmeaManagement::BatteryAlarm batteryAlarm;
|
||||
QRegularExpression sep(QStringLiteral("(\\,|\\*)"));
|
||||
QRegExp sep(QStringLiteral("(\\,|\\*)"));
|
||||
QStringList pkt_data = package.split(sep);
|
||||
alarm_state packageData;
|
||||
INFO_LOG(m_logger) << "pkt_data.size=" << pkt_data.size();
|
||||
@@ -229,7 +229,7 @@ void NmeaHandler::GPGGA(QString package)
|
||||
NmeaManagement::PositionExcon PositionExcon;
|
||||
double latDecimal;
|
||||
double lonDecimal;
|
||||
QRegularExpression sep(QStringLiteral("(\\,|\\*)"));
|
||||
QRegExp sep(QStringLiteral("(\\,|\\*)"));
|
||||
QStringList pkt_data = package.split(sep);
|
||||
gpgga_data packageData;
|
||||
|
||||
@@ -316,7 +316,7 @@ void NmeaHandler::GPGGA(QString package)
|
||||
|
||||
void NmeaHandler::GPRMC(QString package)
|
||||
{
|
||||
QRegularExpression sep(QStringLiteral("(\\,|\\*)"));
|
||||
QRegExp sep(QStringLiteral("(\\,|\\*)"));
|
||||
QStringList pkt_data = package.split(sep);
|
||||
gprmc_data packageData;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <cmath>
|
||||
#include <QQueue>
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "socket_handler.h"
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
#include <QLatin1String>
|
||||
#include "nmea_handler.h"
|
||||
#include <QHostAddress>
|
||||
@@ -23,13 +23,14 @@ SocketHandler::SocketHandler(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
, TurnRadioMasterOffRequestHandler(ddsHandler->fts())
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_nmeaHandler(nmeaHandler)
|
||||
, m_logger(getLogger("SocketHandler"))
|
||||
{
|
||||
// create a timer
|
||||
m_reconnectTimer = new QTimer(this);
|
||||
|
||||
// setup signal and slot
|
||||
connect(m_reconnectTimer, &QTimer::timeout,
|
||||
this, &SocketHandler::reconnectTimerSlot);
|
||||
connect(m_reconnectTimer, SIGNAL(timeout()),
|
||||
this, SLOT(reconnectTimerSlot()));
|
||||
|
||||
}
|
||||
|
||||
@@ -38,11 +39,11 @@ void SocketHandler::init(QString nmeaHost, int nmeaPort)
|
||||
m_nmeaHost = nmeaHost;
|
||||
m_nmeaPort = nmeaPort;
|
||||
socket = new QUdpSocket(this);
|
||||
connect(socket, &QUdpSocket::connected, this, &SocketHandler::connected);
|
||||
connect(socket, &QUdpSocket::disconnected, this, &SocketHandler::disconnected);
|
||||
connect(socket, &QUdpSocket::readyRead, this, &SocketHandler::readyRead);
|
||||
connect(socket, SIGNAL(connected()), this, SLOT(connected()));
|
||||
connect(socket, SIGNAL(disconnected()), this, SLOT(disconnected()));
|
||||
connect(socket, SIGNAL(readyRead()), this, SLOT(readyRead()));
|
||||
|
||||
connect(socket, &QUdpSocket::bytesWritten, this, &SocketHandler::bytesWritten);
|
||||
connect(socket, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWritten(qint64)));
|
||||
|
||||
INFO_LOG(m_logger) << "Connecting,..";
|
||||
INFO_LOG(m_logger) << nmeaHost << " port: " << nmeaPort;
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtNetwork/QTcpSocket>
|
||||
#include <QtNetwork/QTcpServer>
|
||||
#include <QtNetwork/QUdpSocket>
|
||||
#include <QObject>
|
||||
#include <QTcpSocket>
|
||||
#include <QTcpServer>
|
||||
#include <QUdpSocket>
|
||||
#include <QAbstractSocket>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
#include <NmeaManagement/nme_dts.h>
|
||||
#include <NmeaManagement/nme_fts.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include "dds_handler.h"
|
||||
#include "nmea_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
Reference in new issue
Block a user