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.