Support year unit in userFriendlyDuration()

This commit is contained in:
Chocobo1 2019-06-18 23:01:51 +08:00
parent 1de4c2497c
commit 516c968373
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
4 changed files with 19 additions and 15 deletions

View file

@ -82,7 +82,7 @@ void TransferListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
break;
case TransferListModel::TR_ETA: {
opt.displayAlignment = Qt::AlignRight | Qt::AlignVCenter;
QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::userFriendlyDuration(index.data().toLongLong()));
QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::userFriendlyDuration(index.data().toLongLong(), MAX_ETA));
break;
}
case TransferListModel::TR_SEEDS: