mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
mark constants as static in QFileSystemModelPrivate::size()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
ecf681cbf1
commit
24fa4ef2ab
1 changed files with 4 additions and 4 deletions
|
@ -647,10 +647,10 @@ QString QFileSystemModelPrivate::size(qint64 bytes)
|
||||||
{
|
{
|
||||||
// According to the Si standard KB is 1000 bytes, KiB is 1024
|
// According to the Si standard KB is 1000 bytes, KiB is 1024
|
||||||
// but on windows sizes are calculated by dividing by 1024 so we do what they do.
|
// but on windows sizes are calculated by dividing by 1024 so we do what they do.
|
||||||
const qint64 kb = 1024;
|
static const qint64 kb = 1024;
|
||||||
const qint64 mb = 1024 * kb;
|
static const qint64 mb = 1024 * kb;
|
||||||
const qint64 gb = 1024 * mb;
|
static const qint64 gb = 1024 * mb;
|
||||||
const qint64 tb = 1024 * gb;
|
static const qint64 tb = 1024 * gb;
|
||||||
if (bytes >= tb)
|
if (bytes >= tb)
|
||||||
return QFileSystemModel::tr("%1 TB").arg(QLocale().toString(qreal(bytes) / tb, 'f', 3));
|
return QFileSystemModel::tr("%1 TB").arg(QLocale().toString(qreal(bytes) / tb, 'f', 3));
|
||||||
if (bytes >= gb)
|
if (bytes >= gb)
|
||||||
|
|
Loading…
Add table
Reference in a new issue