summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2013-05-24 15:56:55 +0200
committerArno <am@disconnect.de>2013-05-24 15:56:55 +0200
commit5b0fe518dbfd819d4e5c047078471257baa0a6b8 (patch)
tree0a0c24b2fcb16ade6ec2669d58c9b253d5c24a10 /shemov.cpp
parent1661cab2c916c4b7595f5468b905c37ae79bbd60 (diff)
downloadSheMov-5b0fe518dbfd819d4e5c047078471257baa0a6b8.tar.gz
SheMov-5b0fe518dbfd819d4e5c047078471257baa0a6b8.tar.bz2
SheMov-5b0fe518dbfd819d4e5c047078471257baa0a6b8.zip
Fix display of free space in archive
Don't use scientific notation. Just qRound() the value.
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/shemov.cpp b/shemov.cpp
index a99025f..b6be75f 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -225,9 +225,8 @@ void SheMov::setFsFree(){
p.drawRect(QRectF(usedp, 0, freep, height));
quint64 freeb = static_cast<quint64>(free) * blocksize;
qreal freegib = freeb / 1024.0 / 1024.0 / 1024.0;
- QLocale l;
- QString freeString = l.toString(freegib, 'g', 2);
- freeString.append(tr(" GiB free"));
+ int freeRounded = qRound(freegib);
+ QString freeString = QString("%1 GiB free").arg(QString::number(freeRounded));
QSize stringSize = fm.size(Qt::TextSingleLine, freeString);
int startx = (100 - stringSize.width()) / 2;
int starty = (height - stringSize.height()) / 2 + fm.ascent();