diff options
| author | Marc Mutz <marc.mutz@kdab.com> | 2017-01-05 08:10:53 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@kdab.com> | 2017-01-07 10:48:38 +0000 |
| commit | 555a0f3c511368eff51cd0f8e52f0abc7a0ff28c (patch) | |
| tree | c511491977d0979dfad4591fa21753a62c72be40 /src/plugins/sqldrivers/mysql/qsql_mysql.cpp | |
| parent | 894cd9bcfc041ee3064b7f7b4215415fe99cd6b8 (diff) | |
QFusionStyle: don't lose precision when drawing a progress bar
When qreal is float, it cannot represent all values an int can take,
so we may lose precision in the expression
qreal(value) - minimum
as opposed to the exact result
qint64(value) - minimum'
For lack of trying, I do not know of a value where this would change
the resulting 'progressBarWidth' value, but better be safe than sorry,
and use the 64-bit integer expression instead of floating-point.
Found while reviewing integer arithmetic in QProgressBar as part of
the fix for QTBUG-57857.
Change-Id: I0240c143bb75af6986910489b34042ce9b3a8caa
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/plugins/sqldrivers/mysql/qsql_mysql.cpp')
0 files changed, 0 insertions, 0 deletions
