Fix Windows progress on images >2GB

Closes #133
This commit is contained in:
Floris Bos 2021-01-30 23:02:58 +01:00
parent ab29b218af
commit 2261faabc5

View file

@ -423,8 +423,8 @@ void ImageWriter::pollProgress()
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
if (_taskbarButton) if (_taskbarButton)
{ {
_taskbarButton->progress()->setMaximum(dlTotal); _taskbarButton->progress()->setMaximum(dlTotal/1048576);
_taskbarButton->progress()->setValue(newDlNow); _taskbarButton->progress()->setValue(newDlNow/1048576);
} }
#endif #endif
emit downloadProgress(newDlNow, dlTotal); emit downloadProgress(newDlNow, dlTotal);
@ -439,8 +439,8 @@ void ImageWriter::pollProgress()
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
if (_taskbarButton) if (_taskbarButton)
{ {
_taskbarButton->progress()->setMaximum(verifyTotal); _taskbarButton->progress()->setMaximum(verifyTotal/1048576);
_taskbarButton->progress()->setValue(newVerifyNow); _taskbarButton->progress()->setValue(newVerifyNow/1048576);
} }
#endif #endif
emit verifyProgress(newVerifyNow, verifyTotal); emit verifyProgress(newVerifyNow, verifyTotal);