From 4971cb9a270b1ff03c3141f2f7648d92a7e622f5 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Thu, 4 Jun 2020 13:21:27 +0800 Subject: [PATCH] Don't use deprecated QAbstractSocket::error() --- src/base/net/smtp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/base/net/smtp.cpp b/src/base/net/smtp.cpp index 444f12f53..5c8258a65 100644 --- a/src/base/net/smtp.cpp +++ b/src/base/net/smtp.cpp @@ -113,8 +113,12 @@ Smtp::Smtp(QObject *parent) connect(m_socket, &QIODevice::readyRead, this, &Smtp::readyRead); connect(m_socket, &QAbstractSocket::disconnected, this, &QObject::deleteLater); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + connect(m_socket, &QAbstractSocket::errorOccurred, this, &Smtp::error); +#else connect(m_socket, qOverload(&QAbstractSocket::error) , this, &Smtp::error); +#endif // Test hmacMD5 function (http://www.faqs.org/rfcs/rfc2202.html) Q_ASSERT(hmacMD5("Jefe", "what do ya want for nothing?").toHex()