mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 12:48:04 -06:00
Avoid temporary QString allocations
This fixes clazy warning: Use multi-arg instead [-Wclazy-qstring-arg]
This commit is contained in:
@@ -105,7 +105,8 @@ void ExecutionLog::addPeerMessage(const Log::Peer& peer)
|
||||
QDateTime time = QDateTime::fromMSecsSinceEpoch(peer.timestamp);
|
||||
|
||||
if (peer.blocked)
|
||||
text = "<font color='grey'>" + time.toString(Qt::SystemLocaleShortDate) + "</font> - " + tr("<font color='red'>%1</font> was blocked %2", "x.y.z.w was blocked").arg(peer.ip).arg(peer.reason);
|
||||
text = "<font color='grey'>" + time.toString(Qt::SystemLocaleShortDate) + "</font> - "
|
||||
+ tr("<font color='red'>%1</font> was blocked %2", "x.y.z.w was blocked").arg(peer.ip, peer.reason);
|
||||
else
|
||||
text = "<font color='grey'>" + time.toString(Qt::SystemLocaleShortDate) + "</font> - " + tr("<font color='red'>%1</font> was banned", "x.y.z.w was banned").arg(peer.ip);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user