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
Please register or sign in to comment