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">
|
<choice name="Socks5">
|
||||||
<label>Socks5</label>
|
<label>Socks5</label>
|
||||||
</choice>
|
</choice>
|
||||||
|
<choice name="NoProxy">
|
||||||
|
<label>NoProxy</label>
|
||||||
|
</choice>
|
||||||
<default>System</default>
|
<default>System</default>
|
||||||
</choices>
|
</choices>
|
||||||
</entry>
|
</entry>
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ void ProxyController::setApplicationProxy()
|
|||||||
proxy.setPassword(cfg->proxyPassword());
|
proxy.setPassword(cfg->proxyPassword());
|
||||||
QNetworkProxy::setApplicationProxy(proxy);
|
QNetworkProxy::setApplicationProxy(proxy);
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
proxy.setType(QNetworkProxy::NoProxy);
|
||||||
|
QNetworkProxy::setApplicationProxy(proxy);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -29,6 +29,14 @@ FormCard.FormCardPage {
|
|||||||
currentType = 0;
|
currentType = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FormCard.FormRadioDelegate {
|
||||||
|
text: i18n("No Proxy")
|
||||||
|
checked: currentType === 3
|
||||||
|
enabled: !Config.isProxyTypeImmutable
|
||||||
|
onToggled: {
|
||||||
|
currentType = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
FormCard.FormRadioDelegate {
|
FormCard.FormRadioDelegate {
|
||||||
text: i18n("HTTP")
|
text: i18n("HTTP")
|
||||||
checked: currentType === 1
|
checked: currentType === 1
|
||||||
|
|||||||
Reference in New Issue
Block a user