Raise 'torrent share ratio' maximum limit

The default from Qt was `99.99` which could be too small for some.
The new limit is `INT_MAX` (not `DOUBLE_MAX`) as to hide the rounding/approximation errors from the user.

PR #23559.
This commit is contained in:
Chocobo1
2025-11-30 21:00:16 +08:00
committed by GitHub
parent ed9a8687ad
commit f68bc3fef9
2 changed files with 6 additions and 1 deletions

View File

@@ -1117,6 +1117,8 @@ void OptionsDialog::loadBittorrentTabOptions()
m_ui->spinUploadRateForSlowTorrents->setValue(session->uploadRateForSlowTorrents());
m_ui->spinSlowTorrentsInactivityTimer->setValue(session->slowTorrentsInactivityTimer());
m_ui->spinMaxRatio->setMaximum(std::numeric_limits<int>::max());
if (session->globalMaxRatio() >= 0.)
{
// Enable
@@ -1161,7 +1163,7 @@ void OptionsDialog::loadBittorrentTabOptions()
const QHash<BitTorrent::ShareLimitAction, int> actIndex =
{
{BitTorrent::ShareLimitAction::Stop, 0},
{BitTorrent::ShareLimitAction::Stop, 0},
{BitTorrent::ShareLimitAction::Remove, 1},
{BitTorrent::ShareLimitAction::RemoveWithContent, 2},
{BitTorrent::ShareLimitAction::EnableSuperSeeding, 3}