mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 14:04:23 +00:00
Fix availability value
Closes #13869. Fix up 02f19bfbee1a1529a8dae5106f98c909d82c1932.
This commit is contained in:
parent
a4e7e546ff
commit
8f2cdcef0e
@ -140,11 +140,11 @@ QString TorrentContentModelItem::displayData(const int column) const
|
|||||||
return Utils::Misc::friendlyUnit(remaining());
|
return Utils::Misc::friendlyUnit(remaining());
|
||||||
case COL_AVAILABILITY:
|
case COL_AVAILABILITY:
|
||||||
{
|
{
|
||||||
const int avail = availability();
|
const qreal avail = availability();
|
||||||
if (avail < 0)
|
if (avail < 0)
|
||||||
return tr("N/A");
|
return tr("N/A");
|
||||||
|
|
||||||
const QString value = (avail >= 1.0)
|
const QString value = (avail >= 1)
|
||||||
? QString::fromLatin1("100")
|
? QString::fromLatin1("100")
|
||||||
: Utils::String::fromDouble((avail * 100), 1);
|
: Utils::String::fromDouble((avail * 100), 1);
|
||||||
return QString {value + C_THIN_SPACE + QLatin1Char('%')};
|
return QString {value + C_THIN_SPACE + QLatin1Char('%')};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user