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
This commit is contained in:
Dominik Riebeling 2010-06-03 06:29:10 +00:00
parent 7e538995a5
commit 8be2a90d78

View file

@ -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());