summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qlocale.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 723e63114d..07bc1f8275 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -3805,17 +3805,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)
{