summaryrefslogtreecommitdiffstats
path: root/src/network/ssl
diff options
context:
space:
mode:
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