summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
diff options
context:
space:
mode:
authorPeter Yard <peter.yard@nokia.com>2009-07-24 04:20:16 (GMT)
committerPeter Yard <peter.yard@nokia.com>2009-07-24 04:20:16 (GMT)
commited159f974aa99e2ba3cc3112f7e3a1ced26b14b1 (patch)
treea0fbfb009316f8fb9b2600db7a86fadbeef966e4 /doc/src/snippets
parent3d272951dc9f055e9fc5064098f6a165a8c3e623 (diff)
parent9ec431c161202d9f06f3a7c59181cb0ab523958a (diff)
downloadQt-ed159f974aa99e2ba3cc3112f7e3a1ced26b14b1.zip
Qt-ed159f974aa99e2ba3cc3112f7e3a1ced26b14b1.tar.gz
Qt-ed159f974aa99e2ba3cc3112f7e3a1ced26b14b1.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'doc/src/snippets')
-rw-r--r--doc/src/snippets/code/doc_src_emb-charinput.qdoc2
-rw-r--r--doc/src/snippets/code/src_network_access_qnetworkreply.cpp10
-rw-r--r--doc/src/snippets/code/src_network_ssl_qsslsocket.cpp11
3 files changed, 22 insertions, 1 deletions
diff --git a/doc/src/snippets/code/doc_src_emb-charinput.qdoc b/doc/src/snippets/code/doc_src_emb-charinput.qdoc
index 2539e13..f6b33fe 100644
--- a/doc/src/snippets/code/doc_src_emb-charinput.qdoc
+++ b/doc/src/snippets/code/doc_src_emb-charinput.qdoc
@@ -4,7 +4,7 @@
//! [1]
-configure -qt-kbd-s15000
+configure -qt-kbd-linuxinput
//! [1]
diff --git a/doc/src/snippets/code/src_network_access_qnetworkreply.cpp b/doc/src/snippets/code/src_network_access_qnetworkreply.cpp
new file mode 100644
index 0000000..78b388b
--- /dev/null
+++ b/doc/src/snippets/code/src_network_access_qnetworkreply.cpp
@@ -0,0 +1,10 @@
+//! [0]
+QList<QSslCertificate> cert = QSslCertificate::fromPath(QLatin1String("server-certificate.pem"));
+QSslError error(QSslError::SelfSignedCertificate, cert.at(0));
+QList<QSslError> expectedSslErrors;
+expectedSslErrors.append(error);
+
+QNetworkReply *reply = manager.get(QNetworkRequest(QUrl("https://server.tld/index.html")));
+reply->ignoreSslErrors(expectedSslErrors);
+// here connect signals etc.
+//! [0]
diff --git a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
index afffbab..7845e9b 100644
--- a/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
+++ b/doc/src/snippets/code/src_network_ssl_qsslsocket.cpp
@@ -54,3 +54,14 @@ socket->connectToHostEncrypted("imap", 993);
if (socket->waitForEncrypted(1000))
qDebug("Encrypted!");
//! [5]
+
+//! [6]
+QList<QSslCertificate> cert = QSslCertificate::fromPath(QLatin1String("server-certificate.pem"));
+QSslError error(QSslError::SelfSignedCertificate, cert.at(0));
+QList<QSslError> expectedSslErrors;
+expectedSslErrors.append(error);
+
+QSslSocket socket;
+socket.ignoreSslErrors(expectedSslErrors);
+socket.connectToHostEncrypted("server.tld", 443);
+//! [6]