mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Code cleanup
This commit is contained in:
parent
bbb5ad31c4
commit
b483f09d11
16 changed files with 136 additions and 144 deletions
|
@ -101,7 +101,7 @@ void downloadThread::processDlFinished(QNetworkReply* reply) {
|
|||
}
|
||||
|
||||
void downloadThread::loadCookies(const QString &host_name, QString url) {
|
||||
const QList<QByteArray> &raw_cookies = Preferences::getHostNameCookies(host_name);
|
||||
const QList<QByteArray> raw_cookies = Preferences::getHostNameCookies(host_name);
|
||||
QNetworkCookieJar *cookie_jar = networkManager.cookieJar();
|
||||
QList<QNetworkCookie> cookies;
|
||||
qDebug("Loading cookies for host name: %s", qPrintable(host_name));
|
||||
|
@ -135,7 +135,7 @@ QNetworkReply* downloadThread::downloadUrl(QString url){
|
|||
loadCookies(host_name, url);
|
||||
// Process download request
|
||||
qDebug("url is %s", qPrintable(url));
|
||||
const QUrl &qurl = QUrl::fromEncoded(url.toLocal8Bit());
|
||||
const QUrl qurl = QUrl::fromEncoded(url.toLocal8Bit());
|
||||
QNetworkRequest request(qurl);
|
||||
// Spoof Firefox 3.5 user agent to avoid
|
||||
// Web server banning
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue