mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
Allow to disable confirmation of Pause/Resume All
PR #19067. Closes #18155.
This commit is contained in:
committed by
GitHub
parent
83e6afcb71
commit
cf415dd7fe
@@ -362,14 +362,15 @@ void TransferListWidget::setSelectedTorrentsLocation()
|
||||
|
||||
void TransferListWidget::pauseAllTorrents()
|
||||
{
|
||||
// Show confirmation if user would really like to Pause All
|
||||
const QMessageBox::StandardButton ret =
|
||||
QMessageBox::question(this, tr("Confirm pause")
|
||||
, tr("Would you like to pause all torrents?")
|
||||
, (QMessageBox::Yes | QMessageBox::No));
|
||||
if (Preferences::instance()->confirmPauseAndResumeAll())
|
||||
{
|
||||
// Show confirmation if user would really like to Pause All
|
||||
const QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Confirm pause")
|
||||
, tr("Would you like to pause all torrents?"), (QMessageBox::Yes | QMessageBox::No));
|
||||
|
||||
if (ret != QMessageBox::Yes)
|
||||
return;
|
||||
if (ret != QMessageBox::Yes)
|
||||
return;
|
||||
}
|
||||
|
||||
for (BitTorrent::Torrent *const torrent : asConst(BitTorrent::Session::instance()->torrents()))
|
||||
torrent->pause();
|
||||
@@ -377,14 +378,15 @@ void TransferListWidget::pauseAllTorrents()
|
||||
|
||||
void TransferListWidget::resumeAllTorrents()
|
||||
{
|
||||
// Show confirmation if user would really like to Resume All
|
||||
const QMessageBox::StandardButton ret =
|
||||
QMessageBox::question(this, tr("Confirm resume")
|
||||
, tr("Would you like to resume all torrents?")
|
||||
, (QMessageBox::Yes | QMessageBox::No));
|
||||
if (Preferences::instance()->confirmPauseAndResumeAll())
|
||||
{
|
||||
// Show confirmation if user would really like to Resume All
|
||||
const QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Confirm resume")
|
||||
, tr("Would you like to resume all torrents?"), (QMessageBox::Yes | QMessageBox::No));
|
||||
|
||||
if (ret != QMessageBox::Yes)
|
||||
return;
|
||||
if (ret != QMessageBox::Yes)
|
||||
return;
|
||||
}
|
||||
|
||||
for (BitTorrent::Torrent *const torrent : asConst(BitTorrent::Session::instance()->torrents()))
|
||||
torrent->resume();
|
||||
|
||||
Reference in New Issue
Block a user