if (values.value("isDir").toBool()) {
if (!roleValue.isNull() && roleValue != -1) {
// The item represents a directory.
- if (ContentDisplaySettings::directorySizeCount() || roleValue == -2 /* size is invalid */) {
+ if (ContentDisplaySettings::directorySizeMode() == ContentDisplaySettings::EnumDirectorySizeMode::ContentCount
+ || roleValue == -2 /* size is invalid */) {
// Show the number of sub directories instead of the file size of the directory.
const int count = values.value("count").toInt();
text = i18ncp("@item:intable", "%1 item", "%1 items", count);