1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

[NetworkIcon] Fixed applying selected proxy.

This commit is contained in:
nowrep 2013-06-01 13:01:26 +02:00
parent 04e4d1ebf8
commit 7dd7fe94c6
6 changed files with 22 additions and 4 deletions

View File

@ -9,6 +9,7 @@ Version 1.5.0
* added KWallet password backend plugin
* added Gnome-Keyring password backend plugin
* added StatusBar Icons plugin that adds extra icons to statusbar
* pagescreen can now save output into number of formats, including PDF
* proxy exceptions now supports wildcards (*, ?)
* cancel upload when trying to upload non-readable files
* GreaseMonkey: added support for GM_Settings

View File

@ -64,6 +64,9 @@ NetworkProxyFactory::NetworkProxyFactory()
: QNetworkProxyFactory()
, m_pacManager(new PacManager)
, m_proxyPreference(SystemProxy)
, m_proxyType(QNetworkProxy::HttpProxy)
, m_port(0)
, m_httpsPort(0)
{
}

View File

@ -126,6 +126,7 @@ void SBI_NetworkManager::applyCurrentProxy()
settings.beginGroup("Web-Proxy");
m_currentProxy->saveToSettings(settings);
settings.endGroup();
settings.sync();
mApp->networkManager()->proxyFactory()->loadSettings();
}

View File

@ -118,6 +118,16 @@ void SBI_NetworkProxy::setHttpsPassword(const QString &password)
m_httpsPassword = password;
}
QUrl SBI_NetworkProxy::proxyAutoConfigUrl() const
{
return m_pacUrl;
}
void SBI_NetworkProxy::setProxyAutoConfigUrl(const QUrl &url)
{
m_pacUrl = url;
}
bool SBI_NetworkProxy::useDifferentProxyForHttps() const
{
return m_useDifferentProxyForHttps;

View File

@ -56,7 +56,7 @@ public:
void setHttpsPassword(const QString &password);
QUrl proxyAutoConfigUrl() const;
void setProxyAutoConfigUrl();
void setProxyAutoConfigUrl(const QUrl &url);
bool useDifferentProxyForHttps() const;
void setUseDifferentProxyForHttps(bool use);

View File

@ -25,10 +25,11 @@ void SBI_ProxyWidget::clear()
ui->httpsProxyUsername->clear();
ui->httpsProxyPassword->clear();
ui->useHttpsProxy->setChecked(false);
ui->proxyExceptions->clear();
ui->proxyType->setCurrentIndex(0);
ui->pacUrl->clear();
ui->proxyType->setCurrentIndex(0);
ui->useHttpsProxy->setChecked(false);
ui->noProxy->setChecked(true);
}
@ -46,8 +47,10 @@ SBI_NetworkProxy* SBI_ProxyWidget::getProxy() const
proxy->setHttpsUserName(ui->httpsProxyUsername->text());
proxy->setHttpsPassword(ui->httpsProxyPassword->text());
proxy->setExceptions(ui->proxyExceptions->text().split(QLatin1Char(','), QString::SkipEmptyParts));
proxy->setProxyAutoConfigUrl(QUrl(ui->pacUrl->text()));
proxy->setUseDifferentProxyForHttps(ui->useHttpsProxy->isChecked());
proxy->setExceptions(ui->proxyExceptions->text().split(QLatin1Char(',')));
proxy->setType(ui->proxyType->currentIndex() == 0 ? QNetworkProxy::HttpProxy : QNetworkProxy::Socks5Proxy);
if (ui->noProxy->isChecked()) {