mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 16:07:23 -06:00
Revise checkbox label for "Use any available ports" functionality
Also reorder the checkboxes a bit.
This commit is contained in:
@@ -300,7 +300,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
void (QSpinBox::*qSpinBoxValueChanged)(int) = &QSpinBox::valueChanged;
|
||||
|
||||
connect(m_ui->comboProxyType, qComboBoxCurrentIndexChanged, this, &ThisType::enableProxy);
|
||||
connect(m_ui->checkRandomPort, &QAbstractButton::toggled, m_ui->spinPort, &ThisType::setDisabled);
|
||||
connect(m_ui->useAnyPort, &QAbstractButton::toggled, m_ui->spinPort, &ThisType::setDisabled);
|
||||
|
||||
// Apply button is activated when a value is changed
|
||||
// Behavior tab
|
||||
@@ -408,7 +408,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
// Connection tab
|
||||
connect(m_ui->comboProtocol, qComboBoxCurrentIndexChanged, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->spinPort, qSpinBoxValueChanged, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkRandomPort, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->useAnyPort, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkUPnP, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->spinUploadLimit, qSpinBoxValueChanged, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->spinDownloadLimit, qSpinBoxValueChanged, this, &ThisType::enableApplyButton);
|
||||
@@ -770,7 +770,7 @@ void OptionsDialog::saveOptions()
|
||||
// Connection preferences
|
||||
session->setBTProtocol(static_cast<BitTorrent::BTProtocol>(m_ui->comboProtocol->currentIndex()));
|
||||
session->setPort(getPort());
|
||||
session->setUseRandomPort(m_ui->checkRandomPort->isChecked());
|
||||
session->setUseAnyAvailablePort(m_ui->useAnyPort->isChecked());
|
||||
Net::PortForwarder::instance()->setEnabled(isUPnPEnabled());
|
||||
session->setGlobalDownloadSpeedLimit(m_ui->spinDownloadLimit->value() * 1024);
|
||||
session->setGlobalUploadSpeedLimit(m_ui->spinUploadLimit->value() * 1024);
|
||||
@@ -1068,9 +1068,9 @@ void OptionsDialog::loadOptions()
|
||||
// Connection preferences
|
||||
m_ui->comboProtocol->setCurrentIndex(static_cast<int>(session->btProtocol()));
|
||||
m_ui->checkUPnP->setChecked(Net::PortForwarder::instance()->isEnabled());
|
||||
m_ui->checkRandomPort->setChecked(session->useRandomPort());
|
||||
m_ui->useAnyPort->setChecked(session->useAnyAvailablePort());
|
||||
m_ui->spinPort->setValue(session->port());
|
||||
m_ui->spinPort->setDisabled(m_ui->checkRandomPort->isChecked());
|
||||
m_ui->spinPort->setDisabled(m_ui->useAnyPort->isChecked());
|
||||
|
||||
intValue = session->maxConnections();
|
||||
if (intValue > 0)
|
||||
|
||||
@@ -1490,6 +1490,13 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually</s
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="useAnyPort">
|
||||
<property name="text">
|
||||
<string>Use any available port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkUPnP">
|
||||
<property name="text">
|
||||
@@ -1500,13 +1507,6 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually</s
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkRandomPort">
|
||||
<property name="text">
|
||||
<string>Use different port on each startup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -3281,7 +3281,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupEnableReverseProxySupport">
|
||||
<property name="title">
|
||||
<string>Enable reverse proxy support</string>
|
||||
@@ -3469,6 +3469,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.</string>
|
||||
<tabstop>customThemeFilePath</tabstop>
|
||||
<tabstop>checkStartPaused</tabstop>
|
||||
<tabstop>spinPort</tabstop>
|
||||
<tabstop>useAnyPort</tabstop>
|
||||
<tabstop>checkUPnP</tabstop>
|
||||
<tabstop>textWebUiUsername</tabstop>
|
||||
<tabstop>checkWebUi</tabstop>
|
||||
@@ -3520,7 +3521,6 @@ Use ';' to split multiple entries. Can use wildcard '*'.</string>
|
||||
<tabstop>lineEditAutoRun</tabstop>
|
||||
<tabstop>scrollArea_3</tabstop>
|
||||
<tabstop>randomButton</tabstop>
|
||||
<tabstop>checkRandomPort</tabstop>
|
||||
<tabstop>checkMaxConnecs</tabstop>
|
||||
<tabstop>spinMaxConnec</tabstop>
|
||||
<tabstop>checkMaxConnecsPerTorrent</tabstop>
|
||||
|
||||
Reference in New Issue
Block a user