summaryrefslogtreecommitdiffstats
path: root/src/network/ssl
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-03-04 10:51:12 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-04-19 11:26:02 +0000
commit35b0ecf5da40feac0e7b43d928b60402d75d95d1 (patch)
tree8059de516bc86aa61f19fcd7ea7e78be054037b2 /src/network/ssl
parent7094466f7d0c2176eb3080021a4ea5d220555df9 (diff)
QtNetwork: replace Java-style iterators
... with STL-style iterators or with algorithms. Java-style iterators have overhead. Introduce local template separate_if algorithm from kleopatra project to simplify current code. http://api.kde.org/4.3-api/kdepim-apidocs/kleopatra/html Done-with: Marc Mutz <marc.mutz@kdab.com> Change-Id: Ib154f80f46f8041d9cafd81bed0e1982b21541cf Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/network/ssl')
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 4f62f53a93..0200f5e70b 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -747,9 +747,8 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
certFiles.insert(it.fileInfo().canonicalFilePath());
}
}
- QSetIterator<QString> it(certFiles);
- while (it.hasNext())
- systemCerts.append(QSslCertificate::fromPath(it.next(), platformEncodingFormat));
+ for (const QString& file : qAsConst(certFiles))
+ systemCerts.append(QSslCertificate::fromPath(file, platformEncodingFormat));
# ifndef Q_OS_ANDROID
systemCerts.append(QSslCertificate::fromPath(QLatin1String("/etc/pki/tls/certs/ca-bundle.crt"), QSsl::Pem)); // Fedora, Mandriva
systemCerts.append(QSslCertificate::fromPath(QLatin1String("/usr/local/share/certs/ca-root-nss.crt"), QSsl::Pem)); // FreeBSD's ca_root_nss