Qt <5.7 compatibility

This commit is contained in:
Bill Somerville 2020-09-28 12:18:44 +01:00
parent 349a9349dc
commit aae93e0d82
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -145,8 +145,10 @@ public:
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
connect (socket_.get (), &QAbstractSocket::errorOccurred, this, &PSKReporter::impl::handle_socket_error); connect (socket_.get (), &QAbstractSocket::errorOccurred, this, &PSKReporter::impl::handle_socket_error);
#else #elif QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
connect (socket_.data (), QOverload<QAbstractSocket::SocketError>::of (&QAbstractSocket::error), this, &PSKReporter::impl::handle_socket_error); connect (socket_.data (), QOverload<QAbstractSocket::SocketError>::of (&QAbstractSocket::error), this, &PSKReporter::impl::handle_socket_error);
#else
connect (socket_.data (), static_cast<void (QAbstractSocket::*) (QAbstractSocket::SocketError)> (&QAbstractSocket::error), this, &PSKReporter::impl::handle_socket_error);
#endif #endif
// use this for pseudo connection with UDP, allows us to use // use this for pseudo connection with UDP, allows us to use