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

Grzegorz Kowal noreply at phabricator.kde.org
Sun Aug 5 01:45:46 BST 2018


gkowal created this revision.
gkowal added a reviewer: KDE PIM: KMail.
Restricted Application added a project: KDE PIM.
Restricted Application added a subscriber: kde-pim.
gkowal requested review of this revision.

REVISION 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.

REPOSITORY
  R206 KMail

REVISION DETAIL
  https://phabricator.kde.org/D14617

AFFECTED FILES
  src/collectionpage/collectionquotawidget.cpp

To: gkowal, #kde_pim_kmail
Cc: kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180805/d9dd4743/attachment.html>


More information about the kde-pim mailing list