refactoring: naming notify

This commit is contained in:
semenov
2024-08-28 10:44:35 +03:00
parent 1e4e16971b
commit 52ec9f273f
14 changed files with 66 additions and 57 deletions

View File

@@ -36,3 +36,23 @@ QString Tools::CreateFullPath(QString path)
return fullPath;
}
QString Tools::convertFileSize(quint64 fileSize)
{
quint64 megaByte = fileSize / (1024 * 1024);
QString resultSize;
if (megaByte == 0)
{
auto kiloByte = fileSize / 1024;
resultSize = QString::number(kiloByte) + "кб. ";
}
else
{
resultSize = QString::number(megaByte) + "мб. ";
}
QString result = "Доступно обновление: " + resultSize;
return result;
}