summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbutilqt.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-06-25 17:21:06 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-06-25 17:21:06 +0000
commita3875d7dfe94906c95914840149afbb9944b719f (patch)
treebe7237f7da2ed8dafa7f2efe31da84ee3df763e5 /rbutil/rbutilqt/rbutilqt.cpp
parentdfd4183a7da257a1df9979c3ced830cfd5f1e6e3 (diff)
downloadrockbox-a3875d7dfe94906c95914840149afbb9944b719f.tar.gz
rockbox-a3875d7dfe94906c95914840149afbb9944b719f.tar.bz2
rockbox-a3875d7dfe94906c95914840149afbb9944b719f.zip
Rockbox Utility: fix proxy password getting lost (FS#12166).
The proxy settings are stored as string representation in the configuration file. If username / password contains characters used as separators parsing the string again will cause wrong results. Percent-encode them before storing, and parse it as percent-encoded string when reading it back. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30071 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 59ba9e3c0e..835fb0d0a2 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -1240,11 +1240,13 @@ void RbUtilQt::updateInfo()
QUrl RbUtilQt::proxy()
{
+ QUrl proxy;
if(RbSettings::value(RbSettings::ProxyType) == "manual")
- return QUrl(RbSettings::value(RbSettings::Proxy).toString());
+ proxy.setEncodedUrl(RbSettings::value(RbSettings::Proxy).toByteArray());
else if(RbSettings::value(RbSettings::ProxyType) == "system")
- return System::systemProxy();
- return QUrl("");
+ proxy = System::systemProxy();
+ qDebug() << proxy.userName() << proxy.password() << proxy.host() << proxy.port();
+ return proxy;
}