Implement an option to disable confirmation of torrent recheck

Conflicts:
	src/gui/transferlistwidget.cpp
This commit is contained in:
Oleh Prypin
2015-07-08 23:29:31 +03:00
committed by sledgehammer999
parent 2dbeda5985
commit f989708e31
4 changed files with 22 additions and 5 deletions

View File

@@ -572,9 +572,10 @@ void TransferListWidget::setMaxRatioSelectedTorrents()
void TransferListWidget::recheckSelectedTorrents()
{
QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Recheck confirmation"), tr("Are you sure you want to recheck the selected torrent(s)?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
if (ret != QMessageBox::Yes)
return;
if (Preferences::instance()->confirmTorrentRecheck()) {
QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Recheck confirmation"), tr("Are you sure you want to recheck the selected torrent(s)?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
if (ret != QMessageBox::Yes) return;
}
const QStringList hashes = getSelectedTorrentsHashes();
foreach (const QString &hash, hashes)
BTSession->recheckTorrent(hash);