mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Avoid temporary QString allocations
This fixes clazy warning: Use multi-arg instead [-Wclazy-qstring-arg]
This commit is contained in:
parent
c60b7b213e
commit
0457fd260e
29 changed files with 137 additions and 123 deletions
|
@ -126,8 +126,8 @@ void TransferListDelegate::paint(QPainter * painter, const QStyleOptionViewItem
|
|||
const int seedingTime = index.data(Qt::UserRole).toInt();
|
||||
const QString txt = (seedingTime > 0)
|
||||
? tr("%1 (seeded for %2)", "e.g. 4m39s (seeded for 3m10s)")
|
||||
.arg(Utils::Misc::userFriendlyDuration(elapsedTime))
|
||||
.arg(Utils::Misc::userFriendlyDuration(seedingTime))
|
||||
.arg(Utils::Misc::userFriendlyDuration(elapsedTime)
|
||||
, Utils::Misc::userFriendlyDuration(seedingTime))
|
||||
: Utils::Misc::userFriendlyDuration(elapsedTime);
|
||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, txt);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue