From 4fde3f4a65a06954b1465f9c063858da5040b98f Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Wed, 10 Jul 2013 09:20:25 +0200 Subject: [PATCH] Quota in Account Settings: properly round value --- src/mirall/accountsettings.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mirall/accountsettings.cpp b/src/mirall/accountsettings.cpp index 80a5091de..58c874ba3 100644 --- a/src/mirall/accountsettings.cpp +++ b/src/mirall/accountsettings.cpp @@ -27,6 +27,8 @@ #include "mirall/owncloudsetupwizard.h" #include "mirall/mirallconfigfile.h" +#include + #include #include #include @@ -483,7 +485,7 @@ void AccountSettings::slotUpdateQuota(qint64 total, qint64 used) ui->quotaProgressBar->setEnabled(true); // workaround the label only accepting ints (which may be only 32 bit wide) ui->quotaProgressBar->setMaximum(100); - ui->quotaProgressBar->setValue(used/(double)total * 100); + ui->quotaProgressBar->setValue(round(used/(double)total * 100)); QString usedStr = Utility::octetsToString(used); QString totalStr = Utility::octetsToString(total); ui->quotaLabel->setText(tr("You are using %1 of your available %2 storage.").arg(usedStr, totalStr));