diff options
author | Allan Sandfeld Jensen <[email protected]> | 2020-10-15 13:23:02 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <[email protected]> | 2020-10-16 09:48:09 +0200 |
commit | ada6e4fbe9f363a33d4f9341bbc468d22c0c1442 (patch) | |
tree | 41abb0dfbd9c3dc5566d4679ceee6a6f673e97de /src/network/ssl/qsslconfiguration.cpp | |
parent | b002c48cc799ebe613ed5fadebd0f5956e214388 (diff) |
Fix some bad uses of QSharedPointerData::operator T*
Avoid detaching where possible
Change-Id: I438d3e66689aeef05951af86a48af2a6910da7c2
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Giuseppe D'Angelo <[email protected]>
Diffstat (limited to 'src/network/ssl/qsslconfiguration.cpp')
-rw-r--r-- | src/network/ssl/qsslconfiguration.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp index 4b41d846331..916774db04e 100644 --- a/src/network/ssl/qsslconfiguration.cpp +++ b/src/network/ssl/qsslconfiguration.cpp @@ -630,12 +630,13 @@ void QSslConfiguration::setCiphers(const QList<QSslCipher> &ciphers) */ void QSslConfiguration::setCiphers(const QString &ciphers) { - d->ciphers.clear(); + auto *p = d.data(); + p->ciphers.clear(); const auto cipherNames = ciphers.split(QLatin1Char(':'), Qt::SkipEmptyParts); for (const QString &cipherName : cipherNames) { QSslCipher cipher(cipherName); if (!cipher.isNull()) - d->ciphers << cipher; + p->ciphers << cipher; } } |