SIGNAL/SLOT migration: socket_handler (5), targettimer (1), socketreader (2) + status update
- Migrated old SIGNAL/SLOT connect syntax to function-pointer syntax - socket_handler.cpp: timeout, connected, disconnected, readyRead, bytesWritten - targettimer.cpp: timeout → MyTimerSlot - socketreader.cpp: readyRead, error (with QOverload for overloaded signal) - Updated MIGRATION_STATUS.md with migration progress - Part of Qt5→Qt6 migration with C++17 constraint (RTI 7.7.0 compatibility)
This commit is contained in:
1 parent
bf0b1a3ddd
commit
060792032b
4 files changed
+22
-14
No files matched your search
@@ -28,8 +28,8 @@ SocketHandler::SocketHandler(const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
m_reconnectTimer = new QTimer(this);
|
||||
|
||||
// setup signal and slot
|
||||
connect(m_reconnectTimer, SIGNAL(timeout()),
|
||||
this, SLOT(reconnectTimerSlot()));
|
||||
connect(m_reconnectTimer, &QTimer::timeout,
|
||||
this, &SocketHandler::reconnectTimerSlot);
|
||||
|
||||
}
|
||||
|
||||
@@ -38,11 +38,11 @@ void SocketHandler::init(QString nmeaHost, int nmeaPort)
|
||||
m_nmeaHost = nmeaHost;
|
||||
m_nmeaPort = nmeaPort;
|
||||
socket = new QUdpSocket(this);
|
||||
connect(socket, SIGNAL(connected()), this, SLOT(connected()));
|
||||
connect(socket, SIGNAL(disconnected()), this, SLOT(disconnected()));
|
||||
connect(socket, SIGNAL(readyRead()), this, SLOT(readyRead()));
|
||||
connect(socket, &QUdpSocket::connected, this, &SocketHandler::connected);
|
||||
connect(socket, &QUdpSocket::disconnected, this, &SocketHandler::disconnected);
|
||||
connect(socket, &QUdpSocket::readyRead, this, &SocketHandler::readyRead);
|
||||
|
||||
connect(socket, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWritten(qint64)));
|
||||
connect(socket, &QUdpSocket::bytesWritten, this, &SocketHandler::bytesWritten);
|
||||
|
||||
INFO_LOG(m_logger) << "Connecting,..";
|
||||
INFO_LOG(m_logger) << nmeaHost << " port: " << nmeaPort;
|
||||
|
||||
Reference in new issue
Block a user