1
0
Fork 0
forked from len0rd/rockbox

Simplify progress emit in httpget class a bit.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17706 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2008-06-09 20:43:59 +00:00
parent bca9703b83
commit fb573630b8
2 changed files with 2 additions and 8 deletions

View file

@ -34,6 +34,7 @@ HttpGet::HttpGet(QObject *parent)
m_cached = false;
m_dumbCache = m_globalDumbCache;
getRequest = -1;
headRequest = -1;
// if a request is cancelled before a reponse is available return some
// hint about this in the http response instead of nonsense.
m_response = -1;
@ -49,7 +50,7 @@ HttpGet::HttpGet(QObject *parent)
m_serverTimestamp = QDateTime();
connect(&http, SIGNAL(done(bool)), this, SLOT(httpDone(bool)));
connect(&http, SIGNAL(dataReadProgress(int, int)), this, SLOT(httpProgress(int, int)));
connect(&http, SIGNAL(dataReadProgress(int, int)), this, SIGNAL(dataReadProgress(int, int)));
connect(&http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpFinished(int, bool)));
connect(&http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader&)), this, SLOT(httpResponseHeader(const QHttpResponseHeader&)));
connect(&http, SIGNAL(stateChanged(int)), this, SLOT(httpState(int)));
@ -122,12 +123,6 @@ QHttp::Error HttpGet::error()
}
void HttpGet::httpProgress(int read, int total)
{
emit dataReadProgress(read, total);
}
void HttpGet::setProxy(const QUrl &proxy)
{
qDebug() << "[HTTP]" << __func__ << "(QUrl)" << proxy.toString();

View file

@ -67,7 +67,6 @@ class HttpGet : public QObject
private slots:
void httpDone(bool error);
void httpProgress(int, int);
void httpFinished(int, bool);
void httpResponseHeader(const QHttpResponseHeader&);
void httpState(int);