mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06:00
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:
@@ -1117,6 +1117,8 @@ void OptionsDialog::loadBittorrentTabOptions()
|
|||||||
m_ui->spinUploadRateForSlowTorrents->setValue(session->uploadRateForSlowTorrents());
|
m_ui->spinUploadRateForSlowTorrents->setValue(session->uploadRateForSlowTorrents());
|
||||||
m_ui->spinSlowTorrentsInactivityTimer->setValue(session->slowTorrentsInactivityTimer());
|
m_ui->spinSlowTorrentsInactivityTimer->setValue(session->slowTorrentsInactivityTimer());
|
||||||
|
|
||||||
|
m_ui->spinMaxRatio->setMaximum(std::numeric_limits<int>::max());
|
||||||
|
|
||||||
if (session->globalMaxRatio() >= 0.)
|
if (session->globalMaxRatio() >= 0.)
|
||||||
{
|
{
|
||||||
// Enable
|
// Enable
|
||||||
@@ -1161,7 +1163,7 @@ void OptionsDialog::loadBittorrentTabOptions()
|
|||||||
|
|
||||||
const QHash<BitTorrent::ShareLimitAction, int> actIndex =
|
const QHash<BitTorrent::ShareLimitAction, int> actIndex =
|
||||||
{
|
{
|
||||||
{BitTorrent::ShareLimitAction::Stop, 0},
|
{BitTorrent::ShareLimitAction::Stop, 0},
|
||||||
{BitTorrent::ShareLimitAction::Remove, 1},
|
{BitTorrent::ShareLimitAction::Remove, 1},
|
||||||
{BitTorrent::ShareLimitAction::RemoveWithContent, 2},
|
{BitTorrent::ShareLimitAction::RemoveWithContent, 2},
|
||||||
{BitTorrent::ShareLimitAction::EnableSuperSeeding, 3}
|
{BitTorrent::ShareLimitAction::EnableSuperSeeding, 3}
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
#include "torrentsharelimitswidget.h"
|
#include "torrentsharelimitswidget.h"
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
#include "base/bittorrent/torrent.h"
|
#include "base/bittorrent/torrent.h"
|
||||||
#include "ui_torrentsharelimitswidget.h"
|
#include "ui_torrentsharelimitswidget.h"
|
||||||
|
|
||||||
@@ -59,6 +61,7 @@ TorrentShareLimitsWidget::TorrentShareLimitsWidget(QWidget *parent)
|
|||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
m_ui->spinBoxRatioValue->setEnabled(false);
|
m_ui->spinBoxRatioValue->setEnabled(false);
|
||||||
|
m_ui->spinBoxRatioValue->setMaximum(std::numeric_limits<int>::max());
|
||||||
m_ui->spinBoxRatioValue->setSuffix({});
|
m_ui->spinBoxRatioValue->setSuffix({});
|
||||||
m_ui->spinBoxRatioValue->clear();
|
m_ui->spinBoxRatioValue->clear();
|
||||||
m_ui->spinBoxSeedingTimeValue->setEnabled(false);
|
m_ui->spinBoxSeedingTimeValue->setEnabled(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user