diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2013-01-13 18:42:11 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2013-01-13 18:48:28 +0100 |
commit | d608fd604b4a3c0f0f9ba9dc3bcce7aae6c557f7 (patch) | |
tree | 695b0fa507f9e77f85f75116b8e77c12639f570a | |
parent | 4307f95a1f57d3038a2d41f0f4c0ddf33f50630d (diff) | |
download | rockbox-d608fd604b4a3c0f0f9ba9dc3bcce7aae6c557f7.tar.gz rockbox-d608fd604b4a3c0f0f9ba9dc3bcce7aae6c557f7.zip |
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
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallbase.cpp | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/httpget.cpp | 9 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/httpget.h | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 6 |
4 files changed, 4 insertions, 14 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp index 7a9258accc..6cfb2cd1c6 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp | |||
@@ -80,7 +80,7 @@ void BootloaderInstallBase::downloadBlFinish(bool error) | |||
80 | } | 80 | } |
81 | if(error) { | 81 | if(error) { |
82 | emit logItem(tr("Download error: %1") | 82 | emit logItem(tr("Download error: %1") |
83 | .arg(m_http.error()), LOGERROR); | 83 | .arg(m_http.errorString()), LOGERROR); |
84 | emit done(true); | 84 | emit done(true); |
85 | return; | 85 | return; |
86 | } | 86 | } |
diff --git a/rbutil/rbutilqt/base/httpget.cpp b/rbutil/rbutilqt/base/httpget.cpp index dc2b2ea0ed..05005ee6d3 100644 --- a/rbutil/rbutilqt/base/httpget.cpp +++ b/rbutil/rbutilqt/base/httpget.cpp | |||
@@ -118,15 +118,6 @@ QByteArray HttpGet::readAll() | |||
118 | } | 118 | } |
119 | 119 | ||
120 | 120 | ||
121 | /** @brief get http error | ||
122 | * @return http error | ||
123 | */ | ||
124 | QHttp::Error HttpGet::error() | ||
125 | { | ||
126 | return http.error(); | ||
127 | } | ||
128 | |||
129 | |||
130 | void HttpGet::setProxy(const QUrl &proxy) | 121 | void HttpGet::setProxy(const QUrl &proxy) |
131 | { | 122 | { |
132 | m_proxy = proxy; | 123 | m_proxy = proxy; |
diff --git a/rbutil/rbutilqt/base/httpget.h b/rbutil/rbutilqt/base/httpget.h index 438853ce82..e8a936de08 100644 --- a/rbutil/rbutilqt/base/httpget.h +++ b/rbutil/rbutilqt/base/httpget.h | |||
@@ -35,7 +35,6 @@ class HttpGet : public QObject | |||
35 | bool getFile(const QUrl &url); | 35 | bool getFile(const QUrl &url); |
36 | void setProxy(const QUrl &url); | 36 | void setProxy(const QUrl &url); |
37 | void setProxy(bool); | 37 | void setProxy(bool); |
38 | QHttp::Error error(void); | ||
39 | QString errorString(void); | 38 | QString errorString(void); |
40 | void setFile(QFile*); | 39 | void setFile(QFile*); |
41 | void setCache(const QDir&); | 40 | void setCache(const QDir&); |
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 0cdd8365a0..0b94ba4c10 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp | |||
@@ -224,7 +224,7 @@ void RbUtilQt::downloadInfo() | |||
224 | void RbUtilQt::downloadDone(bool error) | 224 | void RbUtilQt::downloadDone(bool error) |
225 | { | 225 | { |
226 | if(error) { | 226 | if(error) { |
227 | qDebug() << "[RbUtil] network error:" << daily->error(); | 227 | qDebug() << "[RbUtil] network error:" << daily->errorString(); |
228 | ui.statusbar->showMessage(tr("Can't get version information!")); | 228 | ui.statusbar->showMessage(tr("Can't get version information!")); |
229 | QMessageBox::critical(this, tr("Network error"), | 229 | QMessageBox::critical(this, tr("Network error"), |
230 | tr("Can't get version information.\n" | 230 | tr("Can't get version information.\n" |
@@ -232,7 +232,7 @@ void RbUtilQt::downloadDone(bool error) | |||
232 | .arg(daily->errorString())); | 232 | .arg(daily->errorString())); |
233 | return; | 233 | return; |
234 | } | 234 | } |
235 | qDebug() << "[RbUtil] network status:" << daily->error(); | 235 | qDebug() << "[RbUtil] network status:" << daily->errorString(); |
236 | 236 | ||
237 | // read info into ServerInfo object | 237 | // read info into ServerInfo object |
238 | buildInfo.open(); | 238 | buildInfo.open(); |
@@ -655,7 +655,7 @@ void RbUtilQt::checkUpdate(void) | |||
655 | void RbUtilQt::downloadUpdateDone(bool error) | 655 | void RbUtilQt::downloadUpdateDone(bool error) |
656 | { | 656 | { |
657 | if(error) { | 657 | if(error) { |
658 | qDebug() << "[RbUtil] network error:" << update->error(); | 658 | qDebug() << "[RbUtil] network error:" << update->errorString(); |
659 | } | 659 | } |
660 | else { | 660 | else { |
661 | QString toParse(update->readAll()); | 661 | QString toParse(update->readAll()); |