Compare ints instead of floats for progress check

This commit is contained in:
Lipu Fei 2018-04-25 16:46:20 +02:00
parent 48eda4d0dc
commit 3ea80c7c7c

View file

@ -485,7 +485,7 @@ class Toolbox(QObject, Extension):
if bytes_total > 0:
new_progress = bytes_sent / bytes_total * 100
self.setDownloadProgress(new_progress)
if new_progress == 100.0:
if bytes_sent == bytes_total:
self.setIsDownloading(False)
self._download_reply.downloadProgress.disconnect(self._onDownloadProgress)
# must not delete the temporary file on Windows