Add "Remove torrent and its files" option to share ratio limiting

This commit is contained in:
thalieht 2019-09-18 19:26:01 +03:00
parent 19c70fd659
commit 07eb261991
7 changed files with 97 additions and 39 deletions

View file

@ -371,8 +371,9 @@ void TransferListWidget::deleteSelectedTorrents(bool deleteLocalFiles)
if (Preferences::instance()->confirmTorrentDeletion()
&& !DeletionConfirmationDialog::askForDeletionConfirmation(this, deleteLocalFiles, torrents.size(), torrents[0]->name()))
return;
for (BitTorrent::TorrentHandle *const torrent : torrents)
BitTorrent::Session::instance()->deleteTorrent(torrent->hash(), deleteLocalFiles);
const DeleteOption deleteOption = deleteLocalFiles ? TorrentAndFiles : Torrent;
for (const BitTorrent::TorrentHandle *torrent : torrents)
BitTorrent::Session::instance()->deleteTorrent(torrent->hash(), deleteOption);
}
void TransferListWidget::deleteVisibleTorrents()
@ -388,8 +389,9 @@ void TransferListWidget::deleteVisibleTorrents()
&& !DeletionConfirmationDialog::askForDeletionConfirmation(this, deleteLocalFiles, torrents.size(), torrents[0]->name()))
return;
for (BitTorrent::TorrentHandle *const torrent : asConst(torrents))
BitTorrent::Session::instance()->deleteTorrent(torrent->hash(), deleteLocalFiles);
const DeleteOption deleteOption = deleteLocalFiles ? TorrentAndFiles : Torrent;
for (const BitTorrent::TorrentHandle *torrent : asConst(torrents))
BitTorrent::Session::instance()->deleteTorrent(torrent->hash(), deleteOption);
}
void TransferListWidget::increaseQueuePosSelectedTorrents()