Mercurial > hg > svcore
comparison system/System.cpp @ 689:573d45e9487b
Merge from debug-output branch
author | Chris Cannam |
---|---|
date | Tue, 14 Jun 2011 14:47:59 +0100 |
parents | b4a8d8221eaf |
children | 001d77a720ce |
comparison
equal
deleted
inserted
replaced
688:be43b2fe68e8 | 689:573d45e9487b |
---|---|
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 |