diff options
Diffstat (limited to 'src/network/doc/snippets/code/src_network_ssl_qsslsocket.cpp')
-rw-r--r-- | src/network/doc/snippets/code/src_network_ssl_qsslsocket.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/network/doc/snippets/code/src_network_ssl_qsslsocket.cpp b/src/network/doc/snippets/code/src_network_ssl_qsslsocket.cpp index 6ad795fcb9..eed032589e 100644 --- a/src/network/doc/snippets/code/src_network_ssl_qsslsocket.cpp +++ b/src/network/doc/snippets/code/src_network_ssl_qsslsocket.cpp @@ -5,7 +5,7 @@ using namespace Qt::StringLiterals; //! [0] QSslSocket *socket = new QSslSocket(this); -connect(socket, SIGNAL(encrypted()), this, SLOT(ready())); +connect(socket, &QSslSocket::encrypted, this, &Receiver::ready); socket->connectToHostEncrypted("imap.example.com", 993); //! [0] @@ -42,19 +42,13 @@ while (socket.waitForReadyRead()) //! [3] QSslSocket socket; -connect(&socket, SIGNAL(encrypted()), receiver, SLOT(socketEncrypted())); +connect(&socket, &QSslSocket::encrypted, receiver, &Receiver::socketEncrypted); socket.connectToHostEncrypted("imap", 993); socket->write("1 CAPABILITY\r\n"); //! [3] -//! [4] -QSslSocket socket; -socket.setCiphers("DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA"); -//! [4] - - //! [5] socket->connectToHostEncrypted("imap", 993); if (socket->waitForEncrypted(1000)) |