comparison system/System.cpp @ 686:b4a8d8221eaf debug-output

Remove most toStdString calls (no longer needed, with debug header)
author Chris Cannam
date Thu, 12 May 2011 17:31:24 +0100
parents d7f3dfe6f9a4
children 001d77a720ce
comparison
equal deleted inserted replaced
685:99222d4bfc78 686:b4a8d8221eaf
217 QStringList elements = line.split(' ', QString::SkipEmptyParts); 217 QStringList elements = line.split(' ', QString::SkipEmptyParts);
218 QString unit = "kB"; 218 QString unit = "kB";
219 if (elements.size() > 2) unit = elements[2]; 219 if (elements.size() > 2) unit = elements[2];
220 int size = elements[1].toInt(); 220 int size = elements[1].toInt();
221 // std::cerr << "have size \"" << size << "\", unit \"" 221 // std::cerr << "have size \"" << size << "\", unit \""
222 // << unit.toStdString() << "\"" << std::endl; 222 // << unit << "\"" << std::endl;
223 if (unit.toLower() == "gb") size = size * 1024; 223 if (unit.toLower() == "gb") size = size * 1024;
224 else if (unit.toLower() == "mb") size = size; 224 else if (unit.toLower() == "mb") size = size;
225 else if (unit.toLower() == "kb") size = size / 1024; 225 else if (unit.toLower() == "kb") size = size / 1024;
226 else size = size / 1048576; 226 else size = size / 1048576;
227 227