Code cleanup

This commit is contained in:
Christophe Dumez 2010-07-23 14:05:53 +00:00
parent bbb5ad31c4
commit b483f09d11
16 changed files with 136 additions and 144 deletions

View file

@ -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