┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-04-09 09:44:05 +0200
committerPeter Penz <[email protected]>2012-04-09 09:50:17 +0200
commit16e5740828a6f66c6437100f9e66c90bbee498d0 (patch)
tree0865a361b70ef5a840afdf8822bbf17427267f2e /src/kitemviews
parente0ac8b61fb907ac19f9bebf01cb5be17d4c88ba8 (diff)
Revert the 2.0 decision to always use KB for file-sizes
The feedback on bugs.kde.org has shown that the previous behavior (= show size with best-matching unit) is preferred by most users. I initially wanted to make this configurable, but for implementing it in a non-hacky way extending KLocale from kdelibs would have been required. I'm not sure whether the usecase in Dolphin justifies having such a configuration in KLocale - however as kdelibs is frozen at the moment this is no option and the old behavior has been restored. BUG: 289850 FIXED-IN: 4.9.0
Diffstat (limited to 'src/kitemviews')
-rw-r--r--src/kitemviews/kfileitemlistwidget.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/kitemviews/kfileitemlistwidget.cpp b/src/kitemviews/kfileitemlistwidget.cpp
index af7ea1523..14ec1ec22 100644
--- a/src/kitemviews/kfileitemlistwidget.cpp
+++ b/src/kitemviews/kfileitemlistwidget.cpp
@@ -1071,11 +1071,8 @@ QString KFileItemListWidget::roleText(const QByteArray& role, const QHash<QByteA
}
}
} else {
- // Show the size in kilobytes (always round up)
- const KLocale* locale = KGlobal::locale();
- const int roundInc = (locale->binaryUnitDialect() == KLocale::MetricBinaryDialect) ? 499 : 511;
- const KIO::filesize_t size = roleValue.value<KIO::filesize_t>() + roundInc;
- text = locale->formatByteSize(size, 0, KLocale::DefaultBinaryDialect, KLocale::UnitKiloByte);
+ const KIO::filesize_t size = roleValue.value<KIO::filesize_t>();
+ text = KGlobal::locale()->formatByteSize(size);
}
break;
}