mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Use correct format for double formatting.
This commit is contained in:
parent
51ddfbc340
commit
3296efe46b
1 changed files with 4 additions and 2 deletions
|
@ -13,6 +13,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "base/qt/qt_common_adapters.h"
|
#include "base/qt/qt_common_adapters.h"
|
||||||
#include "base/qt/qt_string_view.h"
|
#include "base/qt/qt_string_view.h"
|
||||||
|
|
||||||
|
#include <QtCore/QLocale>
|
||||||
|
|
||||||
namespace Lang {
|
namespace Lang {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -943,11 +945,11 @@ ShortenedCount FormatCountToShort(int64 number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString FormatCountDecimal(int64 number) {
|
QString FormatCountDecimal(int64 number) {
|
||||||
return QString("%L1").arg(number);
|
return QLocale().toString(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString FormatExactCountDecimal(float64 number) {
|
QString FormatExactCountDecimal(float64 number) {
|
||||||
return QString("%L1").arg(number);
|
return QLocale().toString(number, 'f', QLocale::FloatingPointShortest);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShortenedCount FormatStarsAmountToShort(StarsAmount amount) {
|
ShortenedCount FormatStarsAmountToShort(StarsAmount amount) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue