mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 18:04:32 +00:00
Remove the max half-open connections option from GUI
Its functionality was deprecated long ago.
This commit is contained in:
parent
bcfa62cc76
commit
4c53447d35
@ -287,7 +287,6 @@ Session::Session(QObject *parent)
|
|||||||
, m_announceIP(BITTORRENT_SESSION_KEY("AnnounceIP"))
|
, m_announceIP(BITTORRENT_SESSION_KEY("AnnounceIP"))
|
||||||
, m_isSuperSeedingEnabled(BITTORRENT_SESSION_KEY("SuperSeedingEnabled"), false)
|
, m_isSuperSeedingEnabled(BITTORRENT_SESSION_KEY("SuperSeedingEnabled"), false)
|
||||||
, m_maxConnections(BITTORRENT_SESSION_KEY("MaxConnections"), 500, lowerLimited(0, -1))
|
, m_maxConnections(BITTORRENT_SESSION_KEY("MaxConnections"), 500, lowerLimited(0, -1))
|
||||||
, m_maxHalfOpenConnections(BITTORRENT_SESSION_KEY("MaxHalfOpenConnections"), 20, lowerLimited(0, -1))
|
|
||||||
, m_maxUploads(BITTORRENT_SESSION_KEY("MaxUploads"), -1, lowerLimited(0, -1))
|
, m_maxUploads(BITTORRENT_SESSION_KEY("MaxUploads"), -1, lowerLimited(0, -1))
|
||||||
, m_maxConnectionsPerTorrent(BITTORRENT_SESSION_KEY("MaxConnectionsPerTorrent"), 100, lowerLimited(0, -1))
|
, m_maxConnectionsPerTorrent(BITTORRENT_SESSION_KEY("MaxConnectionsPerTorrent"), 100, lowerLimited(0, -1))
|
||||||
, m_maxUploadsPerTorrent(BITTORRENT_SESSION_KEY("MaxUploadsPerTorrent"), -1, lowerLimited(0, -1))
|
, m_maxUploadsPerTorrent(BITTORRENT_SESSION_KEY("MaxUploadsPerTorrent"), -1, lowerLimited(0, -1))
|
||||||
@ -3113,20 +3112,6 @@ void Session::setMaxConnections(int max)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Session::maxHalfOpenConnections() const
|
|
||||||
{
|
|
||||||
return m_maxHalfOpenConnections;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Session::setMaxHalfOpenConnections(int max)
|
|
||||||
{
|
|
||||||
max = (max > 0) ? max : -1;
|
|
||||||
if (max != m_maxHalfOpenConnections) {
|
|
||||||
m_maxHalfOpenConnections = max;
|
|
||||||
configureDeferred();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int Session::maxUploads() const
|
int Session::maxUploads() const
|
||||||
{
|
{
|
||||||
return m_maxUploads;
|
return m_maxUploads;
|
||||||
|
@ -413,8 +413,6 @@ namespace BitTorrent
|
|||||||
void setSuperSeedingEnabled(bool enabled);
|
void setSuperSeedingEnabled(bool enabled);
|
||||||
int maxConnections() const;
|
int maxConnections() const;
|
||||||
void setMaxConnections(int max);
|
void setMaxConnections(int max);
|
||||||
int maxHalfOpenConnections() const;
|
|
||||||
void setMaxHalfOpenConnections(int max);
|
|
||||||
int maxConnectionsPerTorrent() const;
|
int maxConnectionsPerTorrent() const;
|
||||||
void setMaxConnectionsPerTorrent(int max);
|
void setMaxConnectionsPerTorrent(int max);
|
||||||
int maxUploads() const;
|
int maxUploads() const;
|
||||||
@ -660,7 +658,6 @@ namespace BitTorrent
|
|||||||
CachedSettingValue<QString> m_announceIP;
|
CachedSettingValue<QString> m_announceIP;
|
||||||
CachedSettingValue<bool> m_isSuperSeedingEnabled;
|
CachedSettingValue<bool> m_isSuperSeedingEnabled;
|
||||||
CachedSettingValue<int> m_maxConnections;
|
CachedSettingValue<int> m_maxConnections;
|
||||||
CachedSettingValue<int> m_maxHalfOpenConnections;
|
|
||||||
CachedSettingValue<int> m_maxUploads;
|
CachedSettingValue<int> m_maxUploads;
|
||||||
CachedSettingValue<int> m_maxConnectionsPerTorrent;
|
CachedSettingValue<int> m_maxConnectionsPerTorrent;
|
||||||
CachedSettingValue<int> m_maxUploadsPerTorrent;
|
CachedSettingValue<int> m_maxUploadsPerTorrent;
|
||||||
|
@ -102,7 +102,6 @@ enum AdvSettingsRows
|
|||||||
SEND_BUF_LOW_WATERMARK,
|
SEND_BUF_LOW_WATERMARK,
|
||||||
SEND_BUF_WATERMARK_FACTOR,
|
SEND_BUF_WATERMARK_FACTOR,
|
||||||
// ports
|
// ports
|
||||||
MAX_HALF_OPEN,
|
|
||||||
OUTGOING_PORT_MIN,
|
OUTGOING_PORT_MIN,
|
||||||
OUTGOING_PORT_MAX,
|
OUTGOING_PORT_MAX,
|
||||||
UTP_MIX_MODE,
|
UTP_MIX_MODE,
|
||||||
@ -189,8 +188,6 @@ void AdvancedSettings::saveAdvancedSettings()
|
|||||||
// Peer resolution
|
// Peer resolution
|
||||||
pref->resolvePeerCountries(checkBoxResolveCountries.isChecked());
|
pref->resolvePeerCountries(checkBoxResolveCountries.isChecked());
|
||||||
pref->resolvePeerHostNames(checkBoxResolveHosts.isChecked());
|
pref->resolvePeerHostNames(checkBoxResolveHosts.isChecked());
|
||||||
// Max Half-Open connections
|
|
||||||
session->setMaxHalfOpenConnections(spinBoxMaxHalfOpen.value());
|
|
||||||
// Super seeding
|
// Super seeding
|
||||||
session->setSuperSeedingEnabled(checkBoxSuperSeeding.isChecked());
|
session->setSuperSeedingEnabled(checkBoxSuperSeeding.isChecked());
|
||||||
// Network interface
|
// Network interface
|
||||||
@ -439,11 +436,6 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||||||
// Resolve peer hosts
|
// Resolve peer hosts
|
||||||
checkBoxResolveHosts.setChecked(pref->resolvePeerHostNames());
|
checkBoxResolveHosts.setChecked(pref->resolvePeerHostNames());
|
||||||
addRow(RESOLVE_HOSTS, tr("Resolve peer host names"), &checkBoxResolveHosts);
|
addRow(RESOLVE_HOSTS, tr("Resolve peer host names"), &checkBoxResolveHosts);
|
||||||
// Max Half Open connections
|
|
||||||
spinBoxMaxHalfOpen.setMinimum(0);
|
|
||||||
spinBoxMaxHalfOpen.setMaximum(99999);
|
|
||||||
spinBoxMaxHalfOpen.setValue(session->maxHalfOpenConnections());
|
|
||||||
addRow(MAX_HALF_OPEN, tr("Maximum number of half-open connections [0: Unlimited]"), &spinBoxMaxHalfOpen);
|
|
||||||
// Super seeding
|
// Super seeding
|
||||||
checkBoxSuperSeeding.setChecked(session->isSuperSeedingEnabled());
|
checkBoxSuperSeeding.setChecked(session->isSuperSeedingEnabled());
|
||||||
addRow(SUPER_SEEDING, (tr("Strict super seeding") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#strict_super_seeding", "(?)"))
|
addRow(SUPER_SEEDING, (tr("Strict super seeding") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#strict_super_seeding", "(?)"))
|
||||||
|
@ -59,7 +59,7 @@ private:
|
|||||||
template <typename T> void addRow(int row, const QString &text, T *widget);
|
template <typename T> void addRow(int row, const QString &text, T *widget);
|
||||||
|
|
||||||
QLabel labelQbtLink, labelLibtorrentLink;
|
QLabel labelQbtLink, labelLibtorrentLink;
|
||||||
QSpinBox spinBoxAsyncIOThreads, spinBoxCheckingMemUsage, spinBoxCache, spinBoxSaveResumeDataInterval, spinBoxOutgoingPortsMin, spinBoxOutgoingPortsMax, spinBoxListRefresh, spinBoxMaxHalfOpen,
|
QSpinBox spinBoxAsyncIOThreads, spinBoxCheckingMemUsage, spinBoxCache, spinBoxSaveResumeDataInterval, spinBoxOutgoingPortsMin, spinBoxOutgoingPortsMax, spinBoxListRefresh,
|
||||||
spinBoxTrackerPort, spinBoxCacheTTL, spinBoxSendBufferWatermark, spinBoxSendBufferLowWatermark,
|
spinBoxTrackerPort, spinBoxCacheTTL, spinBoxSendBufferWatermark, spinBoxSendBufferLowWatermark,
|
||||||
spinBoxSendBufferWatermarkFactor, spinBoxSavePathHistoryLength;
|
spinBoxSendBufferWatermarkFactor, spinBoxSavePathHistoryLength;
|
||||||
QCheckBox checkBoxOsCache, checkBoxRecheckCompleted, checkBoxResolveCountries, checkBoxResolveHosts, checkBoxSuperSeeding,
|
QCheckBox checkBoxOsCache, checkBoxRecheckCompleted, checkBoxResolveCountries, checkBoxResolveHosts, checkBoxSuperSeeding,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user