Skip to content

Commit

Permalink
fix two bugs with proxy settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilledheart committed Mar 19, 2015
1 parent 61344ec commit d64353d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/settings-mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ void SettingsManager::setProxy(SettingsManager::ProxyType proxy_type, const QStr
return;
}
// skip invalid port
if (proxy_type == HttpProxy && proxy_port_ == 0)
if (proxy_type == HttpProxy && proxy_port == 0)
proxy_port = 80;
if (proxy_port == 0)
return;
Expand Down
5 changes: 4 additions & 1 deletion src/ui/settings-dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ bool SettingsDialog::updateProxySettings()

switch(proxy_type) {
case SettingsManager::HttpProxy:
// if we setup proxy username now and previously
if (mProxyRequirePassword->checkState() == Qt::Checked) {
if (proxy_type == old_proxy_type &&
proxy_host == old_proxy_host &&
Expand All @@ -296,9 +297,11 @@ bool SettingsDialog::updateProxySettings()
break;
}
else {
// and if we don't setup proxy username now and previously
if (proxy_type == old_proxy_type &&
proxy_host == old_proxy_host &&
proxy_port == old_proxy_port)
proxy_port == old_proxy_port &&
old_proxy_username.isEmpty())
break;
proxy_changed = true;
mgr->setProxy(SettingsManager::HttpProxy,
Expand Down

0 comments on commit d64353d

Please sign in to comment.