Changeset 12429


Ignore:
Timestamp:
May 12, 2011, 8:21:27 PM (10 years ago)
Author:
jordan
Message:

(trunk qt) #4236 "Update formatter functions to operate with signed integers" -- patch by taem

Location:
trunk/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/formatter.cc

    r11092 r12429  
    9393
    9494QString
    95 Formatter :: memToString( uint64_t bytes )
     95Formatter :: memToString( int64_t bytes )
    9696{
    97     if( !bytes )
     97    if( bytes < 1 )
     98        return tr( "Unknown" );
     99    else if( !bytes )
    98100        return tr( "None" );
    99101    else {
     
    105107
    106108QString
    107 Formatter :: sizeToString( uint64_t bytes )
     109Formatter :: sizeToString( int64_t bytes )
    108110{
    109     if( !bytes )
     111    if( bytes < 1 )
     112        return tr( "Unknown" );
     113    else if( !bytes )
    110114        return tr( "None" );
    111115    else {
  • trunk/qt/formatter.h

    r11092 r12429  
    3333    public:
    3434
    35         static QString memToString( uint64_t bytes );
    36         static QString sizeToString( uint64_t bytes );
     35        static QString memToString( int64_t bytes );
     36        static QString sizeToString( int64_t bytes );
    3737        static QString speedToString( const Speed& speed );
    3838        static QString percentToString( double x );
Note: See TracChangeset for help on using the changeset viewer.