summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbutilqt.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-06-03 06:29:10 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-06-03 06:29:10 +0000
commit8be2a90d783e5fd0063e22b76a760a917124c758 (patch)
tree8ae59f4249cb8f1bb0af03cfb7771f33ca5c5883 /rbutil/rbutilqt/rbutilqt.cpp
parent7e538995a57f8036c52800deb694ecd108172e2d (diff)
downloadrockbox-8be2a90d783e5fd0063e22b76a760a917124c758.tar.gz
rockbox-8be2a90d783e5fd0063e22b76a760a917124c758.tar.bz2
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
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp11
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)
absolutePath = qApp->applicationDirPath();
HttpGet::setGlobalUserAgent("rbutil/"VERSION);
+ HttpGet::setGlobalProxy(proxy());
// init startup & autodetection
ui.setupUi(this);
#if defined(Q_OS_LINUX)
@@ -319,15 +320,7 @@ void RbUtilQt::updateSettings()
qDebug() << "[RbUtil] updating current settings";
updateDevice();
updateManual();
- if(RbSettings::value(RbSettings::ProxyType) == "system") {
- HttpGet::setGlobalProxy(System::systemProxy());
- }
- else if(RbSettings::value(RbSettings::ProxyType) == "manual") {
- HttpGet::setGlobalProxy(RbSettings::value(RbSettings::Proxy).toString());
- }
- else {
- HttpGet::setGlobalProxy(QUrl(""));
- }
+ HttpGet::setGlobalProxy(proxy());
HttpGet::setGlobalCache(RbSettings::value(RbSettings::CachePath).toString());
HttpGet::setGlobalDumbCache(RbSettings::value(RbSettings::CacheOffline).toBool());