[mythtv-commits] Ticket #3957: Missing comma in disk space sizes greater than 1000 MB
MythTV
mythtv at cvs.mythtv.org
Thu Sep 13 11:10:24 UTC 2007
#3957: Missing comma in disk space sizes greater than 1000 MB
-----------------------+----------------------------------------------------
Reporter: anonymous | Owner: ijr
Type: defect | Status: new
Priority: trivial | Milestone: unknown
Component: mythtv | Version: head
Severity: low | Resolution:
Mlocked: 0 |
-----------------------+----------------------------------------------------
Comment(by nigel):
Following code in programs/mythbackend/httpstatus.cpp is the culprit:
{{{
os << " <li>Total Space: ";
sRep.sprintf( "%d,%03d MB ", (nTotal) / 1000, (nTotal) %
1000);
os << sRep << "</li>\r\n";
os << " <li>Space Used: ";
sRep.sprintf( "%d,%03d MB ", (nUsed) / 1000, (nUsed) %
1000);
os << sRep << "</li>\r\n";
os << " <li>Space Free: ";
sRep.sprintf( "%d,%03d MB ", (nFree) / 1000, (nFree) %
1000);
}}}
Note that the code currently will output bad strings like 0,123MB for
small numbers. If there isn't an easy way to do this in Qt, we should
probably add a nice formatter in libs/libmyth/util.cpp ?
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/3957#comment:2>
MythTV <http://svn.mythtv.org/trac>
MythTV
More information about the mythtv-commits
mailing list