summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/ssl/qsslsocket.cpp')
-rw-r--r--src/network/ssl/qsslsocket.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 9286a9a622..cf971a30bf 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -289,7 +289,7 @@
If you want to continue connecting despite the errors that have occurred,
you must call QSslSocket::ignoreSslErrors() from inside a slot connected to
this signal. If you need to access the error list at a later point, you
- can call sslErrors() (without arguments).
+ can call sslHandshakeErrors().
\a errors contains one or more errors that prevent QSslSocket from
verifying the identity of the peer.
@@ -1825,16 +1825,37 @@ bool QSslSocket::waitForDisconnected(int msecs)
return retVal;
}
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
+ \deprecated
+
+ Use sslHandshakeErrors() instead.
+
Returns a list of the last SSL errors that occurred. This is the
same list as QSslSocket passes via the sslErrors() signal. If the
connection has been encrypted with no errors, this function will
return an empty list.
- \sa connectToHostEncrypted()
+ \sa connectToHostEncrypted(), sslHandshakeErrors()
*/
QList<QSslError> QSslSocket::sslErrors() const
{
+ return sslHandshakeErrors();
+}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
+/*!
+ \since 5.15
+
+ Returns a list of the last SSL errors that occurred. This is the
+ same list as QSslSocket passes via the sslErrors() signal. If the
+ connection has been encrypted with no errors, this function will
+ return an empty list.
+
+ \sa connectToHostEncrypted()
+*/
+QList<QSslError> QSslSocket::sslHandshakeErrors() const
+{
Q_D(const QSslSocket);
return d->sslErrors;
}
@@ -2035,7 +2056,7 @@ void QSslSocket::ignoreSslErrors()
You can clear the list of errors you want to ignore by calling this
function with an empty list.
- \sa sslErrors()
+ \sa sslErrors(), sslHandshakeErrors()
*/
void QSslSocket::ignoreSslErrors(const QList<QSslError> &errors)
{