mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 16:53:08 -07:00
Merge pull request #3561 from pmzqla/proxy-torrent
Add an option to allow the use of proxies only for torrents
This commit is contained in:
commit
25c6d8bf6b
6 changed files with 66 additions and 27 deletions
|
@ -235,6 +235,7 @@ options_imp::options_imp(QWidget *parent):
|
|||
connect(spinProxyPort, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
connect(checkProxyPeerConnecs, SIGNAL(toggled(bool)), SLOT(enableApplyButton()));
|
||||
connect(checkForceProxy, SIGNAL(toggled(bool)), SLOT(enableApplyButton()));
|
||||
connect(isProxyOnlyForTorrents, SIGNAL(toggled(bool)), SLOT(enableApplyButton()));
|
||||
connect(checkProxyAuth, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(textProxyUsername, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
connect(textProxyPassword, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
|
@ -445,6 +446,7 @@ void options_imp::saveOptions() {
|
|||
pref->setProxyPort(getProxyPort());
|
||||
pref->setProxyPeerConnections(checkProxyPeerConnecs->isChecked());
|
||||
pref->setForceProxy(checkForceProxy->isChecked());
|
||||
pref->setProxyOnlyForTorrents(isProxyOnlyForTorrents->isChecked());
|
||||
pref->setProxyAuthEnabled(isProxyAuthEnabled());
|
||||
pref->setProxyUsername(getProxyUsername());
|
||||
pref->setProxyPassword(getProxyPassword());
|
||||
|
@ -700,6 +702,7 @@ void options_imp::loadOptions() {
|
|||
spinProxyPort->setValue(pref->getProxyPort());
|
||||
checkProxyPeerConnecs->setChecked(pref->proxyPeerConnections());
|
||||
checkForceProxy->setChecked(pref->getForceProxy());
|
||||
isProxyOnlyForTorrents->setChecked(pref->isProxyOnlyForTorrents());
|
||||
checkProxyAuth->setChecked(pref->isProxyAuthEnabled());
|
||||
textProxyUsername->setText(pref->getProxyUsername());
|
||||
textProxyPassword->setText(pref->getProxyPassword());
|
||||
|
@ -1002,6 +1005,7 @@ void options_imp::enableProxy(int index) {
|
|||
spinProxyPort->setEnabled(true);
|
||||
checkProxyPeerConnecs->setEnabled(true);
|
||||
checkForceProxy->setEnabled(true);
|
||||
isProxyOnlyForTorrents->setEnabled(true);
|
||||
if (index > 1) {
|
||||
checkProxyAuth->setEnabled(true);
|
||||
} else {
|
||||
|
@ -1016,6 +1020,7 @@ void options_imp::enableProxy(int index) {
|
|||
spinProxyPort->setEnabled(false);
|
||||
checkProxyPeerConnecs->setEnabled(false);
|
||||
checkForceProxy->setEnabled(false);
|
||||
isProxyOnlyForTorrents->setEnabled(false);
|
||||
checkProxyAuth->setEnabled(false);
|
||||
checkProxyAuth->setChecked(false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue