Add "No Proxy" option to proxy settings
This commit is contained in:
committed by
Tobias Fella
parent
cae389c04c
commit
d79d806cda
@@ -136,6 +136,9 @@
|
||||
<choice name="Socks5">
|
||||
<label>Socks5</label>
|
||||
</choice>
|
||||
<choice name="NoProxy">
|
||||
<label>NoProxy</label>
|
||||
</choice>
|
||||
<default>System</default>
|
||||
</choices>
|
||||
</entry>
|
||||
|
||||
@@ -30,6 +30,10 @@ void ProxyController::setApplicationProxy()
|
||||
proxy.setPassword(cfg->proxyPassword());
|
||||
QNetworkProxy::setApplicationProxy(proxy);
|
||||
break;
|
||||
case 3:
|
||||
proxy.setType(QNetworkProxy::NoProxy);
|
||||
QNetworkProxy::setApplicationProxy(proxy);
|
||||
break;
|
||||
default:
|
||||
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||
break;
|
||||
|
||||
@@ -29,6 +29,14 @@ FormCard.FormCardPage {
|
||||
currentType = 0;
|
||||
}
|
||||
}
|
||||
FormCard.FormRadioDelegate {
|
||||
text: i18n("No Proxy")
|
||||
checked: currentType === 3
|
||||
enabled: !Config.isProxyTypeImmutable
|
||||
onToggled: {
|
||||
currentType = 3;
|
||||
}
|
||||
}
|
||||
FormCard.FormRadioDelegate {
|
||||
text: i18n("HTTP")
|
||||
checked: currentType === 1
|
||||
|
||||
Reference in New Issue
Block a user