Skip to content

Commit aca76b9

Browse files
committed
Merge #16708: qt: Replace obsolete functions of QSslSocket
2e1455c Replace obsolete functions of QSslSocket (Hennadii Stepanov) Pull request description: The [`QSslSocket::setDefaultCaCertificates()`](https://doc.qt.io/qt-5/qsslsocket-obsolete.html#setDefaultCaCertificates) and [`QSslSocket::systemCaCertificates()`](https://doc.qt.io/qt-5/qsslsocket-obsolete.html#systemCaCertificates) member functions are [obsolete](https://doc.qt.io/qt-5.12/qsslsocket-obsolete.html) since Qt 5.12. This PR replaces them, does not change behavior and keeps compatibility with [Qt 5.5.1](bitcoin/bitcoin#15393). ACKs for top commit: laanwj: ACK 2e1455c promag: ACK 2e1455c. Tree-SHA512: 4182cd22a3e7a998d62a0fe84e748803a6962a65920b74da9fcf5666a700507468bb6e428054ccb70c2fbb7969a56933f450bc405c7a32ecbc1f8af4c1f983a3
2 parents 1f77c5c + 2e1455c commit aca76b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/qt/paymentserver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
#include <QNetworkReply>
4242
#include <QNetworkRequest>
4343
#include <QSslCertificate>
44+
#include <QSslConfiguration>
4445
#include <QSslError>
45-
#include <QSslSocket>
4646
#include <QStringList>
4747
#include <QTextDocument>
4848
#include <QUrlQuery>
@@ -448,9 +448,9 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
448448

449449
certList = QSslCertificate::fromPath(certFile);
450450
// Use those certificates when fetching payment requests, too:
451-
QSslSocket::setDefaultCaCertificates(certList);
451+
QSslConfiguration::defaultConfiguration().setCaCertificates(certList);
452452
} else
453-
certList = QSslSocket::systemCaCertificates();
453+
certList = QSslConfiguration::systemCaCertificates();
454454

455455
int nRootCerts = 0;
456456
const QDateTime currentTime = QDateTime::currentDateTime();

0 commit comments

Comments
 (0)