From e6ea3ab4c41dcc115143a237aafd3a1152849433 Mon Sep 17 00:00:00 2001 From: Méven Car Date: Mon, 4 May 2020 07:26:26 +0200 Subject: [Details mode] Allow to fill the column size of directories with actual size Summary: Allow to compute the recursive size of directories to fill the details view size column. A setting allow to set a limit to the recursive level, allowing the user to have some power over the setting. When sorting by size and the feature is on, we get progressive ordering as the directory size are gathered. KDirectoryContentsCounter uses a cache internally to keep results so that it can display directory size faster, but counts the dir size of directories each time it is asked to count the size a directory nevertheless and when the size has changed, it is updated. KDirectoryContentsCounter uses one worker per instance only, meaning one process per view makes the disk spin. FIXED-IN: 20.08 BUG: 190580 BUG: 158090 Test Plan: With some recursion allowed: {F8267580} Without any recursion allowed (default): {F8267581} Reviewers: elvisangelaccio, ngraham, #dolphin Reviewed By: elvisangelaccio, ngraham, #dolphin Subscribers: feverfew, anthonyfieroni, iasensio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25335 --- src/settings/viewmodes/viewsettingstab.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/settings/viewmodes/viewsettingstab.h') diff --git a/src/settings/viewmodes/viewsettingstab.h b/src/settings/viewmodes/viewsettingstab.h index fff882e5e..4d459fca2 100644 --- a/src/settings/viewmodes/viewsettingstab.h +++ b/src/settings/viewmodes/viewsettingstab.h @@ -28,6 +28,8 @@ class DolphinFontRequester; class QComboBox; class QCheckBox; class QSlider; +class QSpinBox; +class QRadioButton; /** * @brief Represents one tab of the view-settings page. @@ -72,6 +74,9 @@ private: QComboBox* m_widthBox; QComboBox* m_maxLinesBox; QCheckBox* m_expandableFolders; + QRadioButton* m_numberOfItems; + QRadioButton* m_sizeOfContents; + QSpinBox* m_recursiveDirectorySizeLimit; }; #endif -- cgit v1.3