diff --git a/src/GUI.cpp b/src/GUI.cpp index 970a0acd8..256502461 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -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; diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 6c67d4e3a..84e95a4f8 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -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); diff --git a/src/propertieswidget.cpp b/src/propertieswidget.cpp index 65e49ad70..4f6ff793e 100644 --- a/src/propertieswidget.cpp +++ b/src/propertieswidget.cpp @@ -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 diff --git a/src/transferlistdelegate.h b/src/transferlistdelegate.h index b94ab4734..6af1a5a71 100644 --- a/src/transferlistdelegate.h +++ b/src/transferlistdelegate.h @@ -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: {