[Details mode] Allow to fill the column size of directories with actual size

Authored by meven on May 4 2020, 5:26 AM.

Description

[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:

Without any recursion allowed (default):

Reviewers: elvisangelaccio, ngraham, Dolphin

Reviewed By: elvisangelaccio, ngraham, Dolphin

Subscribers: feverfew, anthonyfieroni, iasensio, kfm-devel

Tags: Dolphin

Differential Revision: https://phabricator.kde.org/D25335