From 8e5694be38e856f24f0c3a3c2c72ca41d4f7c48a Mon Sep 17 00:00:00 2001 From: bluebrother Date: Mon, 9 Jun 2008 20:43:59 +0000 Subject: [PATCH] Simplify progress emit in httpget class a bit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17706 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/httpget.cpp | 9 ++------- rbutil/rbutilqt/httpget.h | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/rbutil/rbutilqt/httpget.cpp b/rbutil/rbutilqt/httpget.cpp index f4e2e0468..b349a2f4b 100644 --- a/rbutil/rbutilqt/httpget.cpp +++ b/rbutil/rbutilqt/httpget.cpp @@ -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(); diff --git a/rbutil/rbutilqt/httpget.h b/rbutil/rbutilqt/httpget.h index c8d7269fd..0afd448bc 100644 --- a/rbutil/rbutilqt/httpget.h +++ b/rbutil/rbutilqt/httpget.h @@ -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); -- 2.11.4.GIT