mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Make sure the progress is not 100% unless the file is complete
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.6.5
|
||||||
|
- BUGFIX: Make sure the progress is not 100% unless the file is complete
|
||||||
|
|
||||||
* Sun Jan 23 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.6.4
|
* Sun Jan 23 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.6.4
|
||||||
- BUGFIX: Added unicode support to email notification
|
- BUGFIX: Added unicode support to email notification
|
||||||
- BUGFIX: Improved compatibility with various SMTP servers
|
- BUGFIX: Improved compatibility with various SMTP servers
|
||||||
|
|||||||
@@ -77,6 +77,10 @@ public:
|
|||||||
QStyleOptionProgressBarV2 newopt;
|
QStyleOptionProgressBarV2 newopt;
|
||||||
float progress = index.data().toDouble()*100.;
|
float progress = index.data().toDouble()*100.;
|
||||||
newopt.rect = opt.rect;
|
newopt.rect = opt.rect;
|
||||||
|
// We don't want to display 100% unless
|
||||||
|
// the torrent is really complete
|
||||||
|
if(progress > 99.94 && progress < 100.)
|
||||||
|
progress = 99.9;
|
||||||
newopt.text = QString(QByteArray::number(progress, 'f', 1))+QString::fromUtf8("%");
|
newopt.text = QString(QByteArray::number(progress, 'f', 1))+QString::fromUtf8("%");
|
||||||
newopt.progress = (int)progress;
|
newopt.progress = (int)progress;
|
||||||
newopt.maximum = 100;
|
newopt.maximum = 100;
|
||||||
|
|||||||
@@ -285,6 +285,8 @@ var createPriorityCombo = function(id, selected_prio) {
|
|||||||
row[1] = file.name;
|
row[1] = file.name;
|
||||||
row[2] = file.size;
|
row[2] = file.size;
|
||||||
row[3] = (file.progress*100).round(1);
|
row[3] = (file.progress*100).round(1);
|
||||||
|
if(row[3] == 100.0 && file.progress < 1.0)
|
||||||
|
row[3] = 99.9
|
||||||
row[4] = file.priority;
|
row[4] = file.priority;
|
||||||
fTable.insertRow(i, row);
|
fTable.insertRow(i, row);
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
Reference in New Issue
Block a user