DolphinQt: Get rid of unneeded abbreviation macros.

This commit is contained in:
waddlesplash 2015-11-25 23:05:43 -05:00
parent 662e4fcca0
commit 4acd90d570
9 changed files with 110 additions and 115 deletions

View file

@ -8,14 +8,21 @@
QString NiceSizeFormat(s64 size)
{
QStringList list = { SL("KB"), SL("MB"), SL("GB"), SL("TB"), SL("PB"), SL("EB") };
QStringList list = {
QStringLiteral("KB"),
QStringLiteral("MB"),
QStringLiteral("GB"),
QStringLiteral("TB"),
QStringLiteral("PB"),
QStringLiteral("EB")
};
QStringListIterator i(list);
QString unit = SL("b");
QString unit = QStringLiteral("b");
double num = size;
while (num >= 1024.0 && i.hasNext())
{
unit = i.next();
num /= 1024.0;
}
return SL("%1 %2").arg(QString::number(num, 'f', 1)).arg(unit);
return QStringLiteral("%1 %2").arg(QString::number(num, 'f', 1)).arg(unit);
}