diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-30 08:28:20 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-30 09:16:58 +0100 |
commit | 87204c856ae3d8495c41af998ac196a12fe1c779 (patch) | |
tree | 5af64eaa3acde506d19fe4ab1c88b028a2197adf /src/corelib/tools/qlocale.cpp | |
parent | 498ef7f9d77fca75bcba2f657aaac38c8dc78aea (diff) | |
parent | d0812cbdabcff4d388334c499c23992cce98d4da (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
src/corelib/thread/qsemaphore.cpp
tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
Diffstat (limited to 'src/corelib/tools/qlocale.cpp')
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index c85dcb4358..179784c7ba 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -3809,17 +3809,18 @@ QString QLocale::toCurrencyString(double value, const QString &symbol, int preci /*! \since 5.10 - Converts a size in bytes to a human-readable localized string, expressed in - a unit for which the numeric portion is at least 1 but as low as - possible. For example if \a bytes is 16384, \a precision is 2, and \a format - is \c DataSizeIecFormat (the default), this function returns "16.00 KiB"; - for 1330409069609 bytes it returns "1.21 GiB"; and so on. If \a format is \c - DataSizeIecFormat or \c DataSizeTraditionalFormat, the given number of bytes - is divided by a power of 1024, with result less than 1024; for \c - DataSizeSIFormat, it is divided by a power of 1000, with result less than - 1000. DataSizeIecFormat uses the new IEC standard quantifiers Ki, Mi and so - on, whereas DataSizeSIFormat uses and DataSizeTraditionalFormat abuses the - older SI quantifiers k, M, etc. + Converts a size in bytes to a human-readable localized string, comprising a + number and a quantified unit. The quantifier is chosen such that the number + is at least one, and as small as possible. For example if \a bytes is + 16384, \a precision is 2, and \a format is \l DataSizeIecFormat (the + default), this function returns "16.00 KiB"; for 1330409069609 bytes it + returns "1.21 GiB"; and so on. If \a format is \l DataSizeIecFormat or + \l DataSizeTraditionalFormat, the given number of bytes is divided by a + power of 1024, with result less than 1024; for \l DataSizeSIFormat, it is + divided by a power of 1000, with result less than 1000. + \c DataSizeIecFormat uses the new IEC standard quantifiers Ki, Mi and so on, + whereas \c DataSizeSIFormat uses the older SI quantifiers k, M, etc., and + \c DataSizeTraditionalFormat abuses them. */ QString QLocale::formattedDataSize(qint64 bytes, int precision, DataSizeFormats format) { |