BUG: 420037
BUG: 420040
FIXED-IN: 20.12
// The item represents a directory.
if (!roleValue.isNull()) {
const int count = values.value("count").toInt();
// The item represents a directory.
if (!roleValue.isNull()) {
const int count = values.value("count").toInt();
- if (count < 0) {
- text = i18nc("@item:intable", "Unknown");
- } else {
if (DetailsModeSettings::directorySizeCount()) {
// Show the number of sub directories instead of the file size of the directory.
text = i18ncp("@item:intable", "%1 item", "%1 items", count);
} else {
// if we have directory size available
if (DetailsModeSettings::directorySizeCount()) {
// Show the number of sub directories instead of the file size of the directory.
text = i18ncp("@item:intable", "%1 item", "%1 items", count);
} else {
// if we have directory size available
- if (roleValue == -1) {
- text = i18nc("@item:intable", "Unknown");
- } else {
const KIO::filesize_t size = roleValue.value<KIO::filesize_t>();
text = KFormat().formatByteSize(size);
}
const KIO::filesize_t size = roleValue.value<KIO::filesize_t>();
text = KFormat().formatByteSize(size);
}