Skip to content
Commit c7d0d125 authored by Grzegorz Kowal's avatar Grzegorz Kowal Committed by Daniel Vrátil
Browse files

Fix Quota progress bar for quota limit of 2GB and more

Summary:
Both functions of QProgressBar, setMaximum() and setValue(), accept arguments of int type, however arguments current and maxValue of setQuotaInfo() are of qint64 type. If any of these arguments exceeds the upper limit of int type (around 2GB) the progress bar is displayed incorrectly.

Fix this by directly calculating the percentage of used quota and passing it to setValue() and dropping the setting of maximum (which by default is 100).

Also, correctly round the percentage and make sure it is always in the correct range.

Reviewers: #kde_pim_kmail, vkrause

Reviewed By: vkrause

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D14617
parent d847287a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment