mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
committed by
GitHub
parent
facfa26eed
commit
dd1bd8ad10
@@ -470,9 +470,11 @@ void PeerListWidget::updatePeer(const BitTorrent::Torrent *torrent, const BitTor
|
||||
setModelData(row, PeerListColumns::TOT_UP, totalUp, peer.totalUpload(), intDataTextAlignment);
|
||||
setModelData(row, PeerListColumns::RELEVANCE, (Utils::String::fromDouble(peer.relevance() * 100, 1) + '%'), peer.relevance(), intDataTextAlignment);
|
||||
|
||||
const QStringList downloadingFiles {torrent->hasMetadata()
|
||||
? torrent->info().filesForPiece(peer.downloadingPieceIndex())
|
||||
: QStringList()};
|
||||
const PathList filePaths = torrent->info().filesForPiece(peer.downloadingPieceIndex());
|
||||
QStringList downloadingFiles;
|
||||
downloadingFiles.reserve(filePaths.size());
|
||||
for (const Path &filePath : filePaths)
|
||||
downloadingFiles.append(filePath.toString());
|
||||
const QString downloadingFilesDisplayValue = downloadingFiles.join(';');
|
||||
setModelData(row, PeerListColumns::DOWNLOADING_PIECE, downloadingFilesDisplayValue, downloadingFilesDisplayValue, {}, downloadingFiles.join(QLatin1Char('\n')));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user