mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Improved "delete torrents once they reach a given ratio"
Fix button order in exit confirmation dialog
This commit is contained in:
@@ -541,8 +541,7 @@ void GUI::closeEvent(QCloseEvent *e) {
|
||||
if(QMessageBox::question(this,
|
||||
tr("Are you sure you want to quit?")+QString::fromUtf8(" -- ")+tr("qBittorrent"),
|
||||
tr("Some files are currently transferring.\nAre you sure you want to quit qBittorrent?"),
|
||||
tr("&Yes"), tr("&No"),
|
||||
QString(), 0, 1)) {
|
||||
QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes) == QMessageBox::No) {
|
||||
e->ignore();
|
||||
force_exit = false;
|
||||
return;
|
||||
|
||||
@@ -217,7 +217,7 @@ void Bittorrent::deleteBigRatios() {
|
||||
if(h.is_seed()) {
|
||||
const QString hash = h.hash();
|
||||
const float ratio = getRealRatio(hash);
|
||||
if(ratio <= MAX_RATIO && ratio > ratio_limit) {
|
||||
if(ratio <= MAX_RATIO && ratio >= ratio_limit) {
|
||||
addConsoleMessage(tr("%1 reached the maximum ratio you set.").arg(h.name()));
|
||||
deleteTorrent(hash);
|
||||
//emit torrent_ratio_deleted(fileName);
|
||||
|
||||
@@ -341,7 +341,7 @@ void PropertiesWidget::loadDynamicData() {
|
||||
if(ratio > 100.)
|
||||
shareRatio->setText(QString::fromUtf8("∞"));
|
||||
else
|
||||
shareRatio->setText(QString(QByteArray::number(ratio, 'f', 1)));
|
||||
shareRatio->setText(QString(QByteArray::number(ratio, 'f', 2)));
|
||||
if(!h.is_seed()) {
|
||||
showPiecesDownloaded(true);
|
||||
// Downloaded pieces
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
if(ratio > 100.)
|
||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString::fromUtf8("∞"));
|
||||
else
|
||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString::number(ratio, 'f', 1));
|
||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString::number(ratio, 'f', 2));
|
||||
break;
|
||||
}
|
||||
case TR_PRIORITY: {
|
||||
|
||||
Reference in New Issue
Block a user