Remove HttpGet::error() function.

This function returns an internal enum value of QHttp (which is also
deprecated). It was only used for showing an error to the user / showing it in
the system trace. Since it is an enum value it doesn't have much value. Log /
show the error string instead.

Change-Id: I54b9b6026969f8108f779b02a04477f0ad9201ab
This commit is contained in:
Dominik Riebeling 2013-01-13 18:42:11 +01:00
parent 4307f95a1f
commit d608fd604b
4 changed files with 4 additions and 14 deletions

View file

@ -80,7 +80,7 @@ void BootloaderInstallBase::downloadBlFinish(bool error)
} }
if(error) { if(error) {
emit logItem(tr("Download error: %1") emit logItem(tr("Download error: %1")
.arg(m_http.error()), LOGERROR); .arg(m_http.errorString()), LOGERROR);
emit done(true); emit done(true);
return; return;
} }

View file

@ -118,15 +118,6 @@ QByteArray HttpGet::readAll()
} }
/** @brief get http error
* @return http error
*/
QHttp::Error HttpGet::error()
{
return http.error();
}
void HttpGet::setProxy(const QUrl &proxy) void HttpGet::setProxy(const QUrl &proxy)
{ {
m_proxy = proxy; m_proxy = proxy;

View file

@ -35,7 +35,6 @@ class HttpGet : public QObject
bool getFile(const QUrl &url); bool getFile(const QUrl &url);
void setProxy(const QUrl &url); void setProxy(const QUrl &url);
void setProxy(bool); void setProxy(bool);
QHttp::Error error(void);
QString errorString(void); QString errorString(void);
void setFile(QFile*); void setFile(QFile*);
void setCache(const QDir&); void setCache(const QDir&);

View file

@ -224,7 +224,7 @@ void RbUtilQt::downloadInfo()
void RbUtilQt::downloadDone(bool error) void RbUtilQt::downloadDone(bool error)
{ {
if(error) { if(error) {
qDebug() << "[RbUtil] network error:" << daily->error(); qDebug() << "[RbUtil] network error:" << daily->errorString();
ui.statusbar->showMessage(tr("Can't get version information!")); ui.statusbar->showMessage(tr("Can't get version information!"));
QMessageBox::critical(this, tr("Network error"), QMessageBox::critical(this, tr("Network error"),
tr("Can't get version information.\n" tr("Can't get version information.\n"
@ -232,7 +232,7 @@ void RbUtilQt::downloadDone(bool error)
.arg(daily->errorString())); .arg(daily->errorString()));
return; return;
} }
qDebug() << "[RbUtil] network status:" << daily->error(); qDebug() << "[RbUtil] network status:" << daily->errorString();
// read info into ServerInfo object // read info into ServerInfo object
buildInfo.open(); buildInfo.open();
@ -655,7 +655,7 @@ void RbUtilQt::checkUpdate(void)
void RbUtilQt::downloadUpdateDone(bool error) void RbUtilQt::downloadUpdateDone(bool error)
{ {
if(error) { if(error) {
qDebug() << "[RbUtil] network error:" << update->error(); qDebug() << "[RbUtil] network error:" << update->errorString();
} }
else { else {
QString toParse(update->readAll()); QString toParse(update->readAll());