Skipping of connection refused net errors on Windows with Qt 5.15

Apparently this is still required.
This commit is contained in:
Bill Somerville 2020-06-26 17:57:21 +01:00
parent a02535d655
commit a24f402655
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -425,16 +425,15 @@ MessageClient::MessageClient (QString const& id, QString const& version, QString
{ {
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect (&*m_, static_cast<void (impl::*) (impl::SocketError)> (&impl::error) connect (&*m_, static_cast<void (impl::*) (impl::SocketError)> (&impl::error)
, [this] (impl::SocketError e) , [this] (impl::SocketError e) {
{ #else
connect (&*m_, &impl::errorOccurred, [this] (impl::SocketError e) {
#endif
#if defined (Q_OS_WIN) #if defined (Q_OS_WIN)
if (e != impl::NetworkError // take this out when Qt 5.5 // take this out when Qt 5.5 stops doing this spuriously
// stops doing this if (e != impl::NetworkError
// spuriously // not interested in this with UDP socket
&& e != impl::ConnectionRefusedError) // not && e != impl::ConnectionRefusedError)
// interested
// in this with
// UDP socket
#else #else
Q_UNUSED (e); Q_UNUSED (e);
#endif #endif
@ -442,11 +441,7 @@ MessageClient::MessageClient (QString const& id, QString const& version, QString
Q_EMIT error (m_->errorString ()); Q_EMIT error (m_->errorString ());
} }
}); });
#else
connect (&*m_, &impl::errorOccurred, [this] (impl::SocketError) {
Q_EMIT error (m_->errorString ());
});
#endif
set_server (server); set_server (server);
} }