summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslcipher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/ssl/qsslcipher.cpp')
-rw-r--r--src/network/ssl/qsslcipher.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/ssl/qsslcipher.cpp b/src/network/ssl/qsslcipher.cpp
index 806a27cd1a..738d521a38 100644
--- a/src/network/ssl/qsslcipher.cpp
+++ b/src/network/ssl/qsslcipher.cpp
@@ -90,7 +90,8 @@ QSslCipher::QSslCipher()
QSslCipher::QSslCipher(const QString &name)
: d(new QSslCipherPrivate)
{
- foreach (const QSslCipher &cipher, QSslConfiguration::supportedCiphers()) {
+ const auto ciphers = QSslConfiguration::supportedCiphers();
+ for (const QSslCipher &cipher : ciphers) {
if (cipher.name() == name) {
*this = cipher;
return;
@@ -111,7 +112,8 @@ QSslCipher::QSslCipher(const QString &name)
QSslCipher::QSslCipher(const QString &name, QSsl::SslProtocol protocol)
: d(new QSslCipherPrivate)
{
- foreach (const QSslCipher &cipher, QSslConfiguration::supportedCiphers()) {
+ const auto ciphers = QSslConfiguration::supportedCiphers();
+ for (const QSslCipher &cipher : ciphers) {
if (cipher.name() == name && cipher.protocol() == protocol) {
*this = cipher;
return;