diff options
Diffstat (limited to 'src/tools/iostool/main.cpp')
-rw-r--r-- | src/tools/iostool/main.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/iostool/main.cpp b/src/tools/iostool/main.cpp index 8eccc68d17..3e4141aaf3 100644 --- a/src/tools/iostool/main.cpp +++ b/src/tools/iostool/main.cpp @@ -225,9 +225,12 @@ void Relayer::setClientSocket(QTcpSocket *clientSocket) QTC_CHECK(!m_clientSocket); m_clientSocket = clientSocket; if (m_clientSocket) { - connect(m_clientSocket, - QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error), - this, &Relayer::handleClientHasError); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) + const auto errorOccurred = QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error); +#else + const auto errorOccurred = &QAbstractSocket::errorOccurred; +#endif + connect(m_clientSocket, errorOccurred, this, &Relayer::handleClientHasError); connect(m_clientSocket, &QAbstractSocket::disconnected, this, [this](){server()->removeRelayConnection(this);}); } |