From 8e88797b364cb6a9b041f532f8fb114cd44a4a06 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Thu, 7 Sep 2023 17:29:22 +0300 Subject: [PATCH] qtls_schannel: avoid implicit detach MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit by const method usage Change-Id: I27863d691c228275fc795dfcfbcbcd11e438abc9 Reviewed-by: MÃ¥rten Nordheim --- src/plugins/tls/schannel/qtls_schannel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/tls/schannel/qtls_schannel.cpp b/src/plugins/tls/schannel/qtls_schannel.cpp index 9f9316d571..3c1864f045 100644 --- a/src/plugins/tls/schannel/qtls_schannel.cpp +++ b/src/plugins/tls/schannel/qtls_schannel.cpp @@ -2562,7 +2562,7 @@ bool TlsCryptographSchannel::verifyCertContext(CERT_CONTEXT *certContext) } if (!peerCertificateChain.isEmpty()) - QTlsBackend::storePeerCertificate(d, peerCertificateChain.first()); + QTlsBackend::storePeerCertificate(d, peerCertificateChain.constFirst()); const auto &configuration = q->sslConfiguration(); // Probably, updated by QTlsBackend::storePeerCertificate etc. // @Note: Somewhat copied from qsslsocket_mac.cpp