Changeset 13919 for branches/2.7x/qt/formatter.cc
- Timestamp:
- Feb 1, 2013, 6:52:55 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7x/qt/formatter.cc
r13195 r13919 42 42 unitStrings[SPEED][TB] = tr( "TB/s" ); 43 43 tr_formatter_speed_init( speed_K, 44 qPrintable( unitStrings[SPEED][KB]),45 qPrintable( unitStrings[SPEED][MB]),46 qPrintable( unitStrings[SPEED][GB]),47 qPrintable( unitStrings[SPEED][TB]) );44 unitStrings[SPEED][KB].toUtf8().constData(), 45 unitStrings[SPEED][MB].toUtf8().constData(), 46 unitStrings[SPEED][GB].toUtf8().constData(), 47 unitStrings[SPEED][TB].toUtf8().constData() ); 48 48 49 49 size_K = 1000; … … 54 54 unitStrings[SIZE][TB] = tr( "TB" ); 55 55 tr_formatter_size_init( size_K, 56 qPrintable( unitStrings[SIZE][KB]),57 qPrintable( unitStrings[SIZE][MB]),58 qPrintable( unitStrings[SIZE][GB]),59 qPrintable( unitStrings[SIZE][TB]) );56 unitStrings[SIZE][KB].toUtf8().constData(), 57 unitStrings[SIZE][MB].toUtf8().constData(), 58 unitStrings[SIZE][GB].toUtf8().constData(), 59 unitStrings[SIZE][TB].toUtf8().constData() ); 60 60 61 61 mem_K = 1024; … … 66 66 unitStrings[MEM][TB] = tr( "TiB" ); 67 67 tr_formatter_mem_init( mem_K, 68 qPrintable( unitStrings[MEM][KB]),69 qPrintable( unitStrings[MEM][MB]),70 qPrintable( unitStrings[MEM][GB]),71 qPrintable( unitStrings[MEM][TB]) );68 unitStrings[MEM][KB].toUtf8().constData(), 69 unitStrings[MEM][MB].toUtf8().constData(), 70 unitStrings[MEM][GB].toUtf8().constData(), 71 unitStrings[MEM][TB].toUtf8().constData() ); 72 72 } 73 73 … … 102 102 char buf[128]; 103 103 tr_formatter_mem_B( buf, bytes, sizeof( buf ) ); 104 return buf;104 return QString::fromUtf8( buf ); 105 105 } 106 106 } … … 116 116 char buf[128]; 117 117 tr_formatter_size_B( buf, bytes, sizeof( buf ) ); 118 return buf;118 return QString::fromUtf8( buf ); 119 119 } 120 120 } … … 128 128 char buf[128]; 129 129 tr_formatter_speed_KBps( buf, speed.KBps( ), sizeof( buf ) ); 130 return buf;130 return QString::fromUtf8( buf ); 131 131 } 132 132 }
Note: See TracChangeset
for help on using the changeset viewer.