[mythtv] [PATCH] mythfrontend/statusbox.cpp

tommy myth-dev at tommywatson.com
Thu Jul 21 12:56:35 EDT 2005


This little bug has been annoying me for a while now, I have just over
1.5TB on my machine but the status box was only showing 1.0TB, I want my
missing .5TB dognammit!

-------------- next part --------------
Index: statusbox.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/statusbox.cpp,v
retrieving revision 1.23
diff -u -r1.23 statusbox.cpp
--- statusbox.cpp	24 May 2005 20:19:56 -0000	1.23
+++ statusbox.cpp	21 Jul 2005 16:54:06 -0000
@@ -924,17 +924,17 @@
 {
     if (sizeKB>1024*1024*1024) // Terabytes
     {
-        double sizeGB = sizeKB/(1024*1024*1024);
-        return QString("%1 TB").arg(sizeGB, 0, 'f', (sizeGB>10)?0:prec);
+        double sizeTB = sizeKB/(1024*1024*1024.0);
+        return QString("%1 TB").arg(sizeTB, 0, 'f', (sizeTB>10)?0:prec);
     }
     else if (sizeKB>1024*1024) // Gigabytes
     {
-        double sizeGB = sizeKB/(1024*1024);
+        double sizeGB = sizeKB/(1024*1024.0);
         return QString("%1 GB").arg(sizeGB, 0, 'f', (sizeGB>10)?0:prec);
     }
     else if (sizeKB>1024) // Megabytes
     {
-        double sizeMB = sizeKB/1024;
+        double sizeMB = sizeKB/1024.0;
         return QString("%1 MB").arg(sizeMB, 0, 'f', (sizeMB>10)?0:prec);
     }
     // Kilobytes


More information about the mythtv-dev mailing list