diff options
| author | Méven Car <[email protected]> | 2023-05-26 15:10:09 +0000 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2023-05-26 15:10:09 +0000 |
| commit | a1c5c5cf81b5d1f6b7a0aa10b8a981cb70c5b26c (patch) | |
| tree | 0fcfce01dcef32b1b70b084e9719cf7d9c26418d /src/kitemviews/kfileitemlistwidget.cpp | |
| parent | ab13c8881dafbe5beefef0db5891ce9f731ef489 (diff) | |
KDirectoryContentsCounter: show intermediate dir size counting results, improve stopping, improve data caching
Two user visible changes:
* we can see the dir size changing as it is updated.
* This makes the file counting a lot more reactive, when changing directories for instance.
`KDirectoryContentsCounterWorker::walkDir` is not recursive anymore.
The cache is now shared and only a single thread is used to count size recursively.
Diffstat (limited to 'src/kitemviews/kfileitemlistwidget.cpp')
| -rw-r--r-- | src/kitemviews/kfileitemlistwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemlistwidget.cpp b/src/kitemviews/kfileitemlistwidget.cpp index d9644bef5..ec8683345 100644 --- a/src/kitemviews/kfileitemlistwidget.cpp +++ b/src/kitemviews/kfileitemlistwidget.cpp @@ -67,7 +67,7 @@ QString KFileItemListWidgetInformant::roleText(const QByteArray &role, const QHa if (values.value("isDir").toBool()) { if (!roleValue.isNull() && roleValue != -1) { // The item represents a directory. - if (DetailsModeSettings::directorySizeCount()) { + if (DetailsModeSettings::directorySizeCount() || 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); |
