Use qt5 connect() syntax

This commit is contained in:
thalieht 2018-04-18 16:59:41 +03:00
parent 7af83ab704
commit 6b4455e13d
37 changed files with 198 additions and 175 deletions

View file

@ -111,9 +111,10 @@ Smtp::Smtp(QObject *parent)
m_socket = new QTcpSocket(this);
#endif
connect(m_socket, SIGNAL(readyRead()), SLOT(readyRead()));
connect(m_socket, SIGNAL(disconnected()), SLOT(deleteLater()));
connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(error(QAbstractSocket::SocketError)));
connect(m_socket, &QIODevice::readyRead, this, &Smtp::readyRead);
connect(m_socket, &QAbstractSocket::disconnected, this, &QObject::deleteLater);
connect(m_socket, static_cast<void (QAbstractSocket::*)(QAbstractSocket::SocketError)>(&QAbstractSocket::error)
, this, &Smtp::error);
// Test hmacMD5 function (http://www.faqs.org/rfcs/rfc2202.html)
Q_ASSERT(hmacMD5("Jefe", "what do ya want for nothing?").toHex()