mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
In case of 'system proxy' proxyType, NoProxyFor config key holds the name
of the env variable (e.g. no_proxy) and not its value. Because of this KProtocolManager::noProxyFor() can not be used to get NoProxyFor config setting in KProxyDialog::load() as it returns the content of the environment variable and not its name. Added helper method KSaveIOConfig::noProxyFor() to read that value directly from config file. REVIEW: 114105
This commit is contained in:
parent
b3322111c1
commit
f1699adb2a
|
@ -192,7 +192,7 @@ static void setProxyInformation(const QString& value,
|
|||
portNum = -1;
|
||||
}
|
||||
urlStr = value.left(index).trimmed();
|
||||
} else {
|
||||
} else {
|
||||
urlStr = value.trimmed();
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,7 @@ void KProxyDialog::load()
|
|||
mProxyMap[QL1S("FtpProxy")] = KProtocolManager::proxyFor(QL1S("ftp"));
|
||||
mProxyMap[QL1S("SocksProxy")] = KProtocolManager::proxyFor(QL1S("socks"));
|
||||
mProxyMap[QL1S("ProxyScript")] = KProtocolManager::proxyConfigScript();
|
||||
mProxyMap[QL1S("NoProxy")] = KProtocolManager::noProxyFor();
|
||||
mProxyMap[QL1S("NoProxy")] = KSaveIOConfig::noProxyFor();
|
||||
|
||||
const int proxyType = KProtocolManager::proxyType();
|
||||
|
||||
|
@ -446,8 +446,9 @@ void KProxyDialog::on_autoDetectButton_clicked()
|
|||
count += (autoDetectSystemProxy(mUi.systemProxySocksEdit, ENV_SOCKS_PROXY) ? 1 : 0);
|
||||
count += (autoDetectSystemProxy(mUi.systemNoProxyEdit, ENV_NO_PROXY) ? 1 : 0);
|
||||
|
||||
if (count)
|
||||
emit changed (true);
|
||||
if (count) {
|
||||
emit changed(true);
|
||||
}
|
||||
}
|
||||
|
||||
void KProxyDialog::on_manualProxyHttpEdit_textChanged(const QString& text)
|
||||
|
|
|
@ -184,6 +184,12 @@ void KSaveIOConfig::setProxyType(KProtocolManager::ProxyType type)
|
|||
cfg.sync();
|
||||
}
|
||||
|
||||
QString KSaveIOConfig::noProxyFor()
|
||||
{
|
||||
KConfigGroup cfg(config(), "Proxy Settings");
|
||||
return cfg.readEntry("NoProxyFor");
|
||||
}
|
||||
|
||||
void KSaveIOConfig::setNoProxyFor( const QString& _noproxy )
|
||||
{
|
||||
KConfigGroup cfg (config(), "Proxy Settings");
|
||||
|
|
|
@ -61,6 +61,7 @@ void setProxyConfigScript (const QString&);
|
|||
|
||||
void setProxyFor (const QString&, const QString&);
|
||||
|
||||
QString noProxyFor();
|
||||
void setNoProxyFor (const QString&);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue