Merge pull request #11241 from thalieht/delfolder

Add "Remove torrent and its files" option to share ratio limiting
This commit is contained in:
Mike Tzou 2019-09-29 09:51:41 +08:00 committed by GitHub
commit 975b44d05f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 104 additions and 46 deletions

View file

@ -373,8 +373,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()
@ -390,8 +391,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()