mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 13:48:05 -06:00
committed by
Vladimir Golovnev (Glassez)
parent
f4e6b515c2
commit
b3690494ab
@@ -3021,9 +3021,6 @@ Disable encryption: Only connect to peers without protocol encryption</string>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>9998.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
|
||||
@@ -439,10 +439,10 @@ void PropertiesWidget::loadDynamicData()
|
||||
|
||||
// Update ratio info
|
||||
const qreal ratio = m_torrent->realRatio();
|
||||
m_ui->labelShareRatioVal->setText(ratio > BitTorrent::Torrent::MAX_RATIO ? C_INFINITY : Utils::String::fromDouble(ratio, 2));
|
||||
m_ui->labelShareRatioVal->setText(ratio >= BitTorrent::Torrent::MAX_RATIO ? C_INFINITY : Utils::String::fromDouble(ratio, 2));
|
||||
|
||||
const qreal popularity = m_torrent->popularity();
|
||||
m_ui->labelPopularityVal->setText(popularity > BitTorrent::Torrent::MAX_RATIO ? C_INFINITY : Utils::String::fromDouble(popularity, 2));
|
||||
m_ui->labelPopularityVal->setText(popularity >= BitTorrent::Torrent::MAX_RATIO ? C_INFINITY : Utils::String::fromDouble(popularity, 2));
|
||||
|
||||
m_ui->labelSeedsVal->setText(tr("%1 (%2 total)", "%1 and %2 are numbers, e.g. 3 (10 total)")
|
||||
.arg(QString::number(m_torrent->seedsCount())
|
||||
|
||||
@@ -47,9 +47,6 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>9998.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
|
||||
@@ -293,7 +293,7 @@ QString TransferListModel::displayValue(const BitTorrent::Torrent *torrent, cons
|
||||
if (hideValues && (value <= 0))
|
||||
return {};
|
||||
|
||||
return ((static_cast<int>(value) == -1) || (value > BitTorrent::Torrent::MAX_RATIO))
|
||||
return ((static_cast<int>(value) == -1) || (value >= BitTorrent::Torrent::MAX_RATIO))
|
||||
? C_INFINITY : Utils::String::fromDouble(value, 2);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user