aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPavel Geiger <pavel.geiger@gmail.com>2017-06-07 07:53:04 +0200
committerPavel Geiger <pavel.geiger@gmail.com>2017-06-07 10:35:47 +0000
commit0964f2a9aff8b7bcc4ae81b8a21507cfbee04cee (patch)
treefba692bebe34f4be2285d5d70e4f055d04adc61c /src
parent17585323dda73309a915baa93807ad5b8c5a5e7c (diff)
QWinTaskBarButton: Fix evaluation of progress bar for large values
Change order of evaluation so the division is done first Change-Id: I1ce5ae28e1dafa065bf6b6854477cef9ec5b5b25 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/winextras/qwintaskbarbutton.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/winextras/qwintaskbarbutton.cpp b/src/winextras/qwintaskbarbutton.cpp
index f687f68..cedca35 100644
--- a/src/winextras/qwintaskbarbutton.cpp
+++ b/src/winextras/qwintaskbarbutton.cpp
@@ -166,7 +166,7 @@ void QWinTaskbarButtonPrivate::_q_updateProgress()
const int max = progressBar->maximum();
const int range = max - min;
if (range > 0) {
- const int value = 100 * (progressBar->value() - min) / range;
+ const int value = qRound(double(100) * (double(progressBar->value() - min)) / double(range));
pTbList->SetProgressValue(handle(), ULONGLONG(value), 100);
}
}