From 5b0fe518dbfd819d4e5c047078471257baa0a6b8 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 24 May 2013 15:56:55 +0200 Subject: Fix display of free space in archive Don't use scientific notation. Just qRound() the value. --- shemov.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'shemov.cpp') 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(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(); -- cgit v1.2.3-70-g09d2