mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 21:14:33 +00:00
Show proper string when torrent availability is not available
This commit is contained in:
parent
f5e8b26a55
commit
e4f7d607e1
@ -244,8 +244,11 @@ QString TransferListModel::displayValue(const BitTorrent::Torrent *torrent, cons
|
|||||||
|
|
||||||
const auto availabilityString = [hideValues](const qreal value) -> QString
|
const auto availabilityString = [hideValues](const qreal value) -> QString
|
||||||
{
|
{
|
||||||
return (hideValues && (value <= 0))
|
if (hideValues && (value == 0))
|
||||||
? QString {} : Utils::String::fromDouble(value, 3);
|
return {};
|
||||||
|
return (value >= 0)
|
||||||
|
? Utils::String::fromDouble(value, 3)
|
||||||
|
: tr("N/A");
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto unitString = [hideValues](const qint64 value, const bool isSpeedUnit = false) -> QString
|
const auto unitString = [hideValues](const qint64 value, const bool isSpeedUnit = false) -> QString
|
||||||
|
Loading…
x
Reference in New Issue
Block a user