mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 00:33:09 -07:00
BUGFIX: The user can disable permanently recursive torrent download
This commit is contained in:
parent
f699ee1363
commit
80d76ae038
3 changed files with 23 additions and 1 deletions
13
src/GUI.cpp
13
src/GUI.cpp
|
@ -428,8 +428,19 @@ void GUI::balloonClicked() {
|
|||
}
|
||||
|
||||
void GUI::askRecursiveTorrentDownloadConfirmation(QTorrentHandle &h) {
|
||||
if(QMessageBox::question(this, tr("Recursive download confirmation"), tr("The torrent %1 contains torrent files, do you want to proceed with their download?").arg(h.name()), QMessageBox::Yes|QMessageBox::No) == QMessageBox::Yes) {
|
||||
if(Preferences::recursiveDownloadDisabled()) return;
|
||||
QMessageBox confirmBox(QMessageBox::Question, tr("Recursive download confirmation"), tr("The torrent %1 contains torrent files, do you want to proceed with their download?").arg(h.name()));
|
||||
QPushButton *yes = confirmBox.addButton(tr("Yes"), QMessageBox::YesRole);
|
||||
/*QPushButton *no = */confirmBox.addButton(tr("No"), QMessageBox::NoRole);
|
||||
QPushButton *never = confirmBox.addButton(tr("Never"), QMessageBox::NoRole);
|
||||
confirmBox.exec();
|
||||
if(confirmBox.clickedButton() == 0) return;
|
||||
if(confirmBox.clickedButton() == yes) {
|
||||
BTSession->recursiveTorrentDownload(h);
|
||||
return;
|
||||
}
|
||||
if(confirmBox.clickedButton() == never) {
|
||||
Preferences::disableRecursiveDownload();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue