mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-27 15:04:36 +00:00
Fix HTTPS protocol support in torrent/rss downloader
This commit is contained in:
parent
1eac3d1700
commit
9824d86a3c
@ -42,6 +42,7 @@ enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4, SOCKS4=5};
|
||||
downloadThread::downloadThread(QObject* parent) : QObject(parent) {
|
||||
networkManager = new QNetworkAccessManager(this);
|
||||
connect(networkManager, SIGNAL(finished (QNetworkReply*)), this, SLOT(processDlFinished(QNetworkReply*)));
|
||||
connect(networkManager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), this, SLOT(ignoreSslErrors(QNetworkReply*,QList<QSslError>)));
|
||||
}
|
||||
|
||||
downloadThread::~downloadThread(){
|
||||
@ -213,3 +214,8 @@ QString downloadThread::errorCodeToString(QNetworkReply::NetworkError status) {
|
||||
return tr("Unknown error");
|
||||
}
|
||||
}
|
||||
|
||||
void downloadThread::ignoreSslErrors(QNetworkReply* reply,QList<QSslError> errors) {
|
||||
// Ignore all SSL errors
|
||||
reply->ignoreSslErrors(errors);
|
||||
}
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <QNetworkReply>
|
||||
#include <QObject>
|
||||
#include <QHash>
|
||||
#include <QSslError>
|
||||
|
||||
class QNetworkAccessManager;
|
||||
|
||||
@ -62,6 +63,7 @@ protected:
|
||||
protected slots:
|
||||
void processDlFinished(QNetworkReply* reply);
|
||||
void checkDownloadSize(qint64 bytesReceived, qint64 bytesTotal);
|
||||
void ignoreSslErrors(QNetworkReply*,QList<QSslError>);
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user