Permalink
Browse files

RazorMount: Fix rounding

Fixes #522
  • Loading branch information...
1 parent b8cf4e3 commit e4276d199393d7d1c34c675fee135b08b13c0d1f @amoskvin amoskvin committed Jan 3, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 libraries/razormount/razormount.cpp
@@ -41,15 +41,15 @@ RazorMountDevice::RazorMountDevice():
QString RazorMountDevice::sizeToString(qulonglong size)
{
double n;
- n = size / (1024 * 1024 * 1024);
+ n = size / (1024.0 * 1024 * 1024);
if (n > 0)
return QObject::tr("%1 GB").arg(n, 0, 'f', 1);
- n = size / (1024 * 1024);
+ n = size / (1024.0 * 1024);
if (n > 0)
return QObject::tr("%1 MB").arg(n, 0, 'f', 1);
- n = size / (1024);
+ n = size / (1024.0);
if (n > 0)
return QObject::tr("%1 KB").arg(n, 0, 'f', 1);

0 comments on commit e4276d1

Please sign in to comment.