BUGFIX: Fix HTTPS protocol support in torrent/rss downloader

This commit is contained in:
Christophe Dumez
2010-04-06 16:27:34 +00:00
parent 48dcfb56ad
commit fa43393b65
3 changed files with 10 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.2.5 * Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.2.5
- BUGFIX: Fix default width of file name column in torrent content
- BUGFIX: Fix crash when adding a new torrent label - BUGFIX: Fix crash when adding a new torrent label
- BUGFIX: Fix HTTPS protocol support in torrent/rss downloader
- BUGFIX: Fix default width of file name column in torrent content
- BUGFIX: Fix torrent addition dialog buttons height - BUGFIX: Fix torrent addition dialog buttons height
* Tue Apr 06 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.2.4 * Tue Apr 06 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.2.4

View File

@@ -42,6 +42,7 @@ enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4, SOCKS4=5};
downloadThread::downloadThread(QObject* parent) : QObject(parent) { downloadThread::downloadThread(QObject* parent) : QObject(parent) {
networkManager = new QNetworkAccessManager(this); networkManager = new QNetworkAccessManager(this);
connect(networkManager, SIGNAL(finished (QNetworkReply*)), this, SLOT(processDlFinished(QNetworkReply*))); connect(networkManager, SIGNAL(finished (QNetworkReply*)), this, SLOT(processDlFinished(QNetworkReply*)));
connect(networkManager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), this, SLOT(ignoreSslErrors(QNetworkReply*,QList<QSslError>)));
} }
downloadThread::~downloadThread(){ downloadThread::~downloadThread(){
@@ -213,3 +214,8 @@ QString downloadThread::errorCodeToString(QNetworkReply::NetworkError status) {
return tr("Unknown error"); return tr("Unknown error");
} }
} }
void downloadThread::ignoreSslErrors(QNetworkReply* reply,QList<QSslError> errors) {
// Ignore all SSL errors
reply->ignoreSslErrors(errors);
}

View File

@@ -34,6 +34,7 @@
#include <QNetworkReply> #include <QNetworkReply>
#include <QObject> #include <QObject>
#include <QHash> #include <QHash>
#include <QSslError>
class QNetworkAccessManager; class QNetworkAccessManager;
@@ -62,6 +63,7 @@ protected:
protected slots: protected slots:
void processDlFinished(QNetworkReply* reply); void processDlFinished(QNetworkReply* reply);
void checkDownloadSize(qint64 bytesReceived, qint64 bytesTotal); void checkDownloadSize(qint64 bytesReceived, qint64 bytesTotal);
void ignoreSslErrors(QNetworkReply*,QList<QSslError>);
}; };