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
+3
-2
@@ -24,8 +24,9 @@ bool SocketReader::init(const QString &host, quint16 port, int hlaRequestIdentif
|
||||
DEBUG_LOG(m_logger) << "SR " << hlaRequestIdentifier << ": Trying to establish connection to " << host << ":" << port;
|
||||
|
||||
m_hlaRequestIdentifier = hlaRequestIdentifier;
|
||||
connect(m_socket, SIGNAL(readyRead()), this, SLOT(onReadyRead()));
|
||||
connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(onSocketError(QAbstractSocket::SocketError)));
|
||||
connect(m_socket, &QTcpSocket::readyRead, this, &SocketReader::onReadyRead);
|
||||
connect(m_socket, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error),
|
||||
this, &SocketReader::onSocketError);
|
||||
|
||||
m_socket->connectToHost(host, port, QIODevice::ReadOnly);
|
||||
return m_socket->waitForConnected(1000);
|
||||
|
||||
Reference in new issue
Block a user