mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 08:19:30 +08:00
Don't display weird text in the 'Last Activity' column when the time is invalid.
This commit is contained in:
parent
e907306b41
commit
ecf3dd123e
@ -210,7 +210,10 @@ void TransferListDelegate::paint(QPainter * painter, const QStyleOptionViewItem
|
||||
if (elapsed == 0)
|
||||
// Show '< 1m ago' when elapsed time is 0
|
||||
elapsed = 1;
|
||||
elapsedString = tr("%1 ago", "e.g.: 1h 20m ago").arg(misc::userFriendlyDuration(elapsed));
|
||||
if (elapsed < 0)
|
||||
elapsedString = misc::userFriendlyDuration(elapsed);
|
||||
else
|
||||
elapsedString = tr("%1 ago", "e.g.: 1h 20m ago").arg(misc::userFriendlyDuration(elapsed));
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, elapsedString);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user