summaryrefslogtreecommitdiffstats
path: root/src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp')
-rw-r--r--src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp b/src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp
index d157af737c..12691da7a2 100644
--- a/src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp
+++ b/src/network/doc/snippets/code/src_network_ssl_qsslcertificate.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -39,9 +49,9 @@
****************************************************************************/
//! [0]
-foreach (const QSslCertificate &cert, QSslCertificate::fromPath("C:/ssl/certificate.*.pem",
- QSsl::Pem,
- QRegExp::Wildcard)) {
+const auto certs = QSslCertificate::fromPath("C:/ssl/certificate.*.pem",
+ QSsl::Pem, QRegExp::Wildcard);
+for (const QSslCertificate &cert : certs) {
qDebug() << cert.issuerInfo(QSslCertificate::Organization);
}
//! [0]