moment/src/utils.cpp

24 lines
433 B
C++
Raw Normal View History

2019-12-18 09:50:21 +11:00
// Function implementations of the Utils class, see the utils.h file.
#include <QLocale>
2019-12-04 21:22:04 +11:00
#include <QUuid>
#include "utils.h"
Utils::Utils() {
// Initialization
2019-12-18 09:50:21 +11:00
}
QString Utils::formattedBytes(qint64 bytes, int precision) {
return m_locale.formattedDataSize(
bytes, precision, QLocale::DataSizeTraditionalFormat
);
2019-12-18 09:50:21 +11:00
}
2019-12-04 21:22:04 +11:00
QString Utils::uuid() {
return QUuid::createUuid().toString(QUuid::WithoutBraces);
}