From 24fa4ef2abb55a2482ae9a68b9c737cf2240b4d4 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 21 Oct 2020 00:13:10 +0300 Subject: [PATCH] mark constants as static in QFileSystemModelPrivate::size() Signed-off-by: Ivailo Monev --- src/gui/dialogs/qfilesystemmodel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp index 7ca0bd804..9cbd60363 100644 --- a/src/gui/dialogs/qfilesystemmodel.cpp +++ b/src/gui/dialogs/qfilesystemmodel.cpp @@ -647,10 +647,10 @@ QString QFileSystemModelPrivate::size(qint64 bytes) { // 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. - const qint64 kb = 1024; - const qint64 mb = 1024 * kb; - const qint64 gb = 1024 * mb; - const qint64 tb = 1024 * gb; + static const qint64 kb = 1024; + static const qint64 mb = 1024 * kb; + static const qint64 gb = 1024 * mb; + static const qint64 tb = 1024 * gb; if (bytes >= tb) return QFileSystemModel::tr("%1 TB").arg(QLocale().toString(qreal(bytes) / tb, 'f', 3)); if (bytes >= gb) -- 2.11.0