mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
- Fixed a bug in torrent progress display
This commit is contained in:
@@ -55,7 +55,9 @@ QString QTorrentHandle::name() const {
|
|||||||
|
|
||||||
float QTorrentHandle::progress() const {
|
float QTorrentHandle::progress() const {
|
||||||
Q_ASSERT(h.is_valid());
|
Q_ASSERT(h.is_valid());
|
||||||
float progress = h.status().progress;
|
if(!h.status().total_wanted)
|
||||||
|
return 0.;
|
||||||
|
float progress = (float)h.status().total_wanted_done/(float)h.status().total_wanted;
|
||||||
Q_ASSERT(progress >= 0. && progress <= 1.);
|
Q_ASSERT(progress >= 0. && progress <= 1.);
|
||||||
return progress;
|
return progress;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ contains(DEBUG_MODE, 0){
|
|||||||
|
|
||||||
# For libtorrent stuff
|
# For libtorrent stuff
|
||||||
# (comment this if you are using libtorrent with debug enabled)
|
# (comment this if you are using libtorrent with debug enabled)
|
||||||
#DEFINES += NDEBUG
|
DEFINES += NDEBUG
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user