Use KiB/MiB/GiB/TiB for 1024-based units

That is also consistent with our file properties panel

Change-Id: Ief62f8c067896a410878cfa4c36f17c6daf6fee7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Eike Ziller
2023-05-26 11:11:39 +02:00
parent 5365c5de80
commit 10bf294975
2 changed files with 7 additions and 8 deletions

View File

@@ -51,8 +51,7 @@ const char showCrashButtonKey[] = "ShowCrashButton";
// TODO: move to somewhere in Utils
static QString formatSize(qint64 size)
{
QStringList units {Tr::tr("Bytes"), Tr::tr("KB"), Tr::tr("MB"),
Tr::tr("GB"), Tr::tr("TB")};
QStringList units{Tr::tr("Bytes"), Tr::tr("KiB"), Tr::tr("MiB"), Tr::tr("GiB"), Tr::tr("TiB")};
double outputSize = size;
int i;
for (i = 0; i < units.size() - 1; ++i) {