improve QLocale::formattedDataSize docs slightly

Change-Id: I42aaec6d54299d906bf8e2ef1fd696f121b7c2d0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
bb10
Shawn Rutledge 2017-08-28 17:06:04 +02:00
parent fbca13949a
commit b19036ad56
1 changed files with 12 additions and 11 deletions

View File

@ -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)
{