┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kdirectorycontentscounterworker.cpp
AgeCommit message (Collapse)Author
2025-09-03Fix several user-facing and non-user-facing typosKunda Ki
Found via `codespell -S "*.desktop,*.po,*.svg,*.xml,./po" -L aparent,childs,goup,lokal`
2024-05-21Haiku build fixesSchrijvers Luc
Co-authored-by: Gerasim Troeglazov <[email protected]>
2023-07-05Add explicit moc includes to sources for moc-covered headersFriedrich W. H. Kossebau
* speeds up incremental builds as changes to a header will not always need the full mocs_compilation.cpp for all the target's headers rebuild, while having a moc file sourced into a source file only adds minor extra costs, due to small own code and the used headers usually already covered by the source file, being for the same class/struct * seems to not slow down clean builds, due to empty mocs_compilation.cpp resulting in those quickly processed, while the minor extra cost of the sourced moc files does not outweigh that in summary. Measured times actually improved by some percent points. (ideally CMake would just skip empty mocs_compilation.cpp & its object file one day) * enables compiler to see all methods of a class in same compilation unit to do some sanity checks * potentially more inlining in general, due to more in the compilation unit * allows to keep using more forward declarations in the header, as with the moc code being sourced into the cpp file there definitions can be ensured and often are already for the needs of the normal class methods
2023-05-26KDirectoryContentsCounter: show intermediate dir size counting results, ↵Méven Car
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.
2023-02-12Optimize Directory size countingMéven Car
Two changes: * Prioritise size counting for visible path * stop the worker when switching dirs
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2023-01-09Remove unnecessary method parameterFabian Vogt
(cherry picked from commit ee919ea329ace516fb67468fa2d3c98bf46a66d2)
2023-01-09Fix size of directories if a subdir fails to openFabian Vogt
If opening the directory fails, it returns -1 as size. Don't add that to the parent's total size. (cherry picked from commit a6490755ca7d00c964a1349443ba9c06dbb33e50)
2023-01-09Don't recurse into symlinks when counting directory contentsFabian Vogt
Symlink contents should not be visited for the purpose of displaying sizes. Not only is potentially misleading because the storage is actually used elsewhere (the target location), it can be completely wrong as contents can be visited multiple times, even recursively. BUG: 434125 (cherry picked from commit 491068a4405f93ce66d4f49fa5ba5dee29e9546b)
2022-10-16Fix compile against qt6.4Laurent Montel
"error C2397: conversion from 'qsizetype' to 'int' requires a narrowing conversion"
2020-12-17fix display of folder sizes for empty foldersIlia Kats
also fixes 1 byte error in size calculation for all folders
2020-10-27Fix wrong parameter in function callLothar Paltins
In KDirectoryContentsCounterWorker::CountResult, the first parameter in the call of walkDir was wrong. It should be path without conversion, because the conversion is done in the called function. BUG: 428282
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2020-05-05Fix Windows BuildMéven Car
Summary: Due to D25335 Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29425
2020-05-04[Details mode] Allow to fill the column size of directories with actual sizeMéven Car
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
2018-02-04Use qplatformdefs wrappersElvis Angelaccio
As recommended by krazy and as kio does.
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-09-12Qt 5 Porting: Q_WS_WIN -> Q_OS_WINBen Cooksley
2013-09-04Count the items inside directories in another threadFrank Reininghaus
This prevents that the GUI freezes if there are many files inside the directory, or if the access to the directory is slow for some other reason. BUG: 318518 REVIEW: 111920 FIXED-IN: 4.12.0