mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
Make a few cosmetic changes in code
This commit is contained in:
parent
e030fc067b
commit
f0549b4cb2
@ -882,7 +882,6 @@ Net::ProxyType OptionsDialog::getProxyType() const
|
|||||||
switch (m_ui->comboProxyType->currentIndex()) {
|
switch (m_ui->comboProxyType->currentIndex()) {
|
||||||
case 1:
|
case 1:
|
||||||
return Net::ProxyType::SOCKS4;
|
return Net::ProxyType::SOCKS4;
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
if (isProxyAuthEnabled())
|
if (isProxyAuthEnabled())
|
||||||
return Net::ProxyType::SOCKS5_PW;
|
return Net::ProxyType::SOCKS5_PW;
|
||||||
@ -1443,16 +1442,16 @@ void OptionsDialog::toggleComboRatioLimitAct()
|
|||||||
m_ui->comboRatioLimitAct->setEnabled(m_ui->checkMaxRatio->isChecked() || m_ui->checkMaxSeedingMinutes->isChecked());
|
m_ui->comboRatioLimitAct->setEnabled(m_ui->checkMaxRatio->isChecked() || m_ui->checkMaxSeedingMinutes->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionsDialog::enableProxy(int index)
|
void OptionsDialog::enableProxy(const int index)
|
||||||
{
|
{
|
||||||
if (index) {
|
if (index >= 1) { // Any proxy type is used
|
||||||
//enable
|
//enable
|
||||||
m_ui->lblProxyIP->setEnabled(true);
|
m_ui->lblProxyIP->setEnabled(true);
|
||||||
m_ui->textProxyIP->setEnabled(true);
|
m_ui->textProxyIP->setEnabled(true);
|
||||||
m_ui->lblProxyPort->setEnabled(true);
|
m_ui->lblProxyPort->setEnabled(true);
|
||||||
m_ui->spinProxyPort->setEnabled(true);
|
m_ui->spinProxyPort->setEnabled(true);
|
||||||
m_ui->checkProxyPeerConnecs->setEnabled(true);
|
m_ui->checkProxyPeerConnecs->setEnabled(true);
|
||||||
if (index > 1) {
|
if (index >= 2) { // SOCKS5 or HTTP
|
||||||
m_ui->checkProxyAuth->setEnabled(true);
|
m_ui->checkProxyAuth->setEnabled(true);
|
||||||
m_ui->isProxyOnlyForTorrents->setEnabled(true);
|
m_ui->isProxyOnlyForTorrents->setEnabled(true);
|
||||||
}
|
}
|
||||||
@ -1463,7 +1462,7 @@ void OptionsDialog::enableProxy(int index)
|
|||||||
m_ui->isProxyOnlyForTorrents->setChecked(true);
|
m_ui->isProxyOnlyForTorrents->setChecked(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else { // No proxy
|
||||||
// disable
|
// disable
|
||||||
m_ui->lblProxyIP->setEnabled(false);
|
m_ui->lblProxyIP->setEnabled(false);
|
||||||
m_ui->textProxyIP->setEnabled(false);
|
m_ui->textProxyIP->setEnabled(false);
|
||||||
|
@ -82,7 +82,7 @@ class OptionsDialog : public QDialog
|
|||||||
public:
|
public:
|
||||||
// Constructor / Destructor
|
// Constructor / Destructor
|
||||||
OptionsDialog(QWidget *parent = nullptr);
|
OptionsDialog(QWidget *parent = nullptr);
|
||||||
~OptionsDialog();
|
~OptionsDialog() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void showConnectionTab();
|
void showConnectionTab();
|
||||||
|
Loading…
Reference in New Issue
Block a user