summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-03-25 08:37:16 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2020-06-04 15:58:02 +0200
commit6d6bfcb9ad2ed2f8613ac3120233b9dbe011c644 (patch)
treefb1163bf36a7358bf2b305ce1ea7f39ee670d713 /tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
parent77a8005dcb12a274193c8009df03e84ff6b51582 (diff)
QtNetwork remove deprecated signals
Use 'errorOccurred' instead of 'error' and 'sslHandshakeErrors' instead of 'sslErrors'. Fixes: QTBUG-82605 Change-Id: I19d4845b16c7b636af7b0658d4fbbba4eef9d029 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp')
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index 79bd4994db..0ac87a9cb1 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -4450,9 +4450,6 @@ void tst_QSslSocket::oldErrorsOnSocketReuse()
#if QT_CONFIG(openssl)
-void (QSslSocket::*const tlsErrorSignal)(const QList<QSslError> &) = &QSslSocket::sslErrors;
-void (QAbstractSocket::*const socketErrorSignal)(QAbstractSocket::SocketError) = &QAbstractSocket::error;
-
void tst_QSslSocket::alertMissingCertificate()
{
// In this test we want a server to abort the connection due to the failing
@@ -4474,7 +4471,7 @@ void tst_QSslSocket::alertMissingCertificate()
server.config.setMissingCertificateIsFatal(true);
QSslSocket clientSocket;
- connect(&clientSocket, tlsErrorSignal, [&clientSocket](const QList<QSslError> &errors){
+ connect(&clientSocket, &QSslSocket::sslErrors, [&clientSocket](const QList<QSslError> &errors){
qDebug() << "ERR";
clientSocket.ignoreSslErrors(errors);
});
@@ -4497,7 +4494,7 @@ void tst_QSslSocket::alertMissingCertificate()
// Presumably, RemoteHostClosedError for the client and SslHandshakeError
// for the server:
- connect(&clientSocket, socketErrorSignal, earlyQuitter);
+ connect(&clientSocket, &QAbstractSocket::errorOccurred, earlyQuitter);
connect(&server, &SslServer::socketError, earlyQuitter);
runner.enterLoopMSecs(1000);
@@ -4547,7 +4544,7 @@ void tst_QSslSocket::alertInvalidCertificate()
// Presumably, RemoteHostClosedError for the server and SslHandshakeError
// for the client:
- connect(&clientSocket, socketErrorSignal, earlyQuitter);
+ connect(&clientSocket, &QAbstractSocket::errorOccurred, earlyQuitter);
connect(&server, &SslServer::socketError, earlyQuitter);
runner.enterLoopMSecs(1000);