Browse Source

Fix availability value

Closes #13869.
Fix up 02f19bfbee.
adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
8f2cdcef0e
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 4
      src/gui/torrentcontentmodelitem.cpp

4
src/gui/torrentcontentmodelitem.cpp

@ -140,11 +140,11 @@ QString TorrentContentModelItem::displayData(const int column) const @@ -140,11 +140,11 @@ QString TorrentContentModelItem::displayData(const int column) const
return Utils::Misc::friendlyUnit(remaining());
case COL_AVAILABILITY:
{
const int avail = availability();
const qreal avail = availability();
if (avail < 0)
return tr("N/A");
const QString value = (avail >= 1.0)
const QString value = (avail >= 1)
? QString::fromLatin1("100")
: Utils::String::fromDouble((avail * 100), 1);
return QString {value + C_THIN_SPACE + QLatin1Char('%')};

Loading…
Cancel
Save