┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodelrolesupdater.h
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2023-05-26 15:10:09 +0000
committerMéven Car <[email protected]>2023-05-26 15:10:09 +0000
commita1c5c5cf81b5d1f6b7a0aa10b8a981cb70c5b26c (patch)
tree0fcfce01dcef32b1b70b084e9719cf7d9c26418d /src/kitemviews/kfileitemmodelrolesupdater.h
parentab13c8881dafbe5beefef0db5891ce9f731ef489 (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/kfileitemmodelrolesupdater.h')
-rw-r--r--src/kitemviews/kfileitemmodelrolesupdater.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h
index be6f23193..78fa757f8 100644
--- a/src/kitemviews/kfileitemmodelrolesupdater.h
+++ b/src/kitemviews/kfileitemmodelrolesupdater.h
@@ -260,7 +260,7 @@ private Q_SLOTS:
void applyChangedBalooRoles(const QString &file);
void applyChangedBalooRolesForItem(const KFileItem &file);
- void slotDirectoryContentsCountReceived(const QString &path, int count, long size);
+ void slotDirectoryContentsCountReceived(const QString &path, int count, long long size);
private:
/**
@@ -334,6 +334,9 @@ private:
void trimHoverSequenceLoadedItems();
private:
+ /**
+ * enqueue directory size counting for KFileItem item at index
+ */
void startDirectorySizeCounting(const KFileItem &item, int index);
enum State { Idle, Paused, ResolvingSortRole, ResolvingAllRoles, PreviewJobRunning };
@@ -370,7 +373,6 @@ private:
QSet<QByteArray> m_resolvableRoles;
QStringList m_enabledPlugins;
qulonglong m_localFileSizePreviewLimit;
- bool m_scanDirectories;
// Items for which the sort role still has to be determined.
QSet<KFileItem> m_pendingSortRoleItems;