mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-21 23:43:58 +01:00
clementine-tagreader: Fix addDefaultCaCertificates deprecation
QSslSocket::addDefaultCaCertificates is deprecated in 5.15. Use QSslConfiguration default configuration instead.
This commit is contained in:
parent
5f75bde396
commit
59f6d95b80
@ -19,6 +19,7 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QLocalSocket>
|
||||
#include <QSslConfiguration>
|
||||
#include <QSslSocket>
|
||||
#include <QStringList>
|
||||
#include <iostream>
|
||||
@ -58,8 +59,15 @@ int main(int argc, char** argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
|
||||
// This method is marked deprecated in 5.15.
|
||||
QSslSocket::addDefaultCaCertificates(
|
||||
QSslCertificate::fromPath(":/certs/godaddy-root.pem", QSsl::Pem));
|
||||
#else
|
||||
QSslConfiguration config = QSslConfiguration::defaultConfiguration();
|
||||
config.addCaCertificates(":/certs/godaddy-root.pem", QSsl::Pem);
|
||||
QSslConfiguration::setDefaultConfiguration(config);
|
||||
#endif
|
||||
|
||||
TagReaderWorker worker(&socket);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user