diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2010-06-03 06:29:10 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2010-06-03 06:29:10 +0000 |
commit | 8be2a90d783e5fd0063e22b76a760a917124c758 (patch) | |
tree | 8ae59f4249cb8f1bb0af03cfb7771f33ca5c5883 | |
parent | 7e538995a57f8036c52800deb694ecd108172e2d (diff) | |
download | rockbox-8be2a90d783e5fd0063e22b76a760a917124c758.tar.gz rockbox-8be2a90d783e5fd0063e22b76a760a917124c758.zip |
Fix global proxy getting set too late.
Downloading the build information was done before setting the global proxy
values, so this broke in environments that completely block non-proxy
connections. Explicitly set the proxy on startup before downloading other
things. Remove some duplicated code. Fixes FS#11163.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26504 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index c9becc6eac..29ba0e9c81 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp | |||
@@ -68,6 +68,7 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) | |||
68 | absolutePath = qApp->applicationDirPath(); | 68 | absolutePath = qApp->applicationDirPath(); |
69 | 69 | ||
70 | HttpGet::setGlobalUserAgent("rbutil/"VERSION); | 70 | HttpGet::setGlobalUserAgent("rbutil/"VERSION); |
71 | HttpGet::setGlobalProxy(proxy()); | ||
71 | // init startup & autodetection | 72 | // init startup & autodetection |
72 | ui.setupUi(this); | 73 | ui.setupUi(this); |
73 | #if defined(Q_OS_LINUX) | 74 | #if defined(Q_OS_LINUX) |
@@ -319,15 +320,7 @@ void RbUtilQt::updateSettings() | |||
319 | qDebug() << "[RbUtil] updating current settings"; | 320 | qDebug() << "[RbUtil] updating current settings"; |
320 | updateDevice(); | 321 | updateDevice(); |
321 | updateManual(); | 322 | updateManual(); |
322 | if(RbSettings::value(RbSettings::ProxyType) == "system") { | 323 | HttpGet::setGlobalProxy(proxy()); |
323 | HttpGet::setGlobalProxy(System::systemProxy()); | ||
324 | } | ||
325 | else if(RbSettings::value(RbSettings::ProxyType) == "manual") { | ||
326 | HttpGet::setGlobalProxy(RbSettings::value(RbSettings::Proxy).toString()); | ||
327 | } | ||
328 | else { | ||
329 | HttpGet::setGlobalProxy(QUrl("")); | ||
330 | } | ||
331 | HttpGet::setGlobalCache(RbSettings::value(RbSettings::CachePath).toString()); | 324 | HttpGet::setGlobalCache(RbSettings::value(RbSettings::CachePath).toString()); |
332 | HttpGet::setGlobalDumbCache(RbSettings::value(RbSettings::CacheOffline).toBool()); | 325 | HttpGet::setGlobalDumbCache(RbSettings::value(RbSettings::CacheOffline).toBool()); |
333 | 326 | ||