diff options
| author | Serg Podtynnyi <[email protected]> | 2023-02-04 00:14:53 +0700 |
|---|---|---|
| committer | Serg Podtynnyi <[email protected]> | 2023-02-05 12:45:38 +0700 |
| commit | 38c34eeca315c7be58e65d4d3fb72aaf7b866719 (patch) | |
| tree | 886e53f20c9c43edc3eb7fe04789716a9bc98ebe /src/kitemviews/private/kdirectorycontentscounterworker.cpp | |
| parent | ffff8af851e3a386c44438337779d0ce7ca98a61 (diff) | |
Add clang-format and format code as in Frameworks
Diffstat (limited to 'src/kitemviews/private/kdirectorycontentscounterworker.cpp')
| -rw-r--r-- | src/kitemviews/private/kdirectorycontentscounterworker.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/kitemviews/private/kdirectorycontentscounterworker.cpp b/src/kitemviews/private/kdirectorycontentscounterworker.cpp index 2a683cdbc..e227c1bc6 100644 --- a/src/kitemviews/private/kdirectorycontentscounterworker.cpp +++ b/src/kitemviews/private/kdirectorycontentscounterworker.cpp @@ -17,17 +17,15 @@ #include "dolphin_detailsmodesettings.h" -KDirectoryContentsCounterWorker::KDirectoryContentsCounterWorker(QObject* parent) : - QObject(parent) +KDirectoryContentsCounterWorker::KDirectoryContentsCounterWorker(QObject *parent) + : QObject(parent) { qRegisterMetaType<KDirectoryContentsCounterWorker::Options>(); } #ifndef Q_OS_WIN -KDirectoryContentsCounterWorker::CountResult walkDir(const QString &dirPath, - const bool countHiddenFiles, - const bool countDirectoriesOnly, - const uint allowedRecursiveLevel) +KDirectoryContentsCounterWorker::CountResult +walkDir(const QString &dirPath, const bool countHiddenFiles, const bool countDirectoriesOnly, const uint allowedRecursiveLevel) { int count = -1; long size = -1; @@ -53,10 +51,7 @@ KDirectoryContentsCounterWorker::CountResult walkDir(const QString &dirPath, // If only directories are counted, consider an unknown file type and links also // as directory instead of trying to do an expensive stat() // (see bugs 292642 and 299997). - const bool countEntry = !countDirectoriesOnly || - dirEntry->d_type == DT_DIR || - dirEntry->d_type == DT_LNK || - dirEntry->d_type == DT_UNKNOWN; + const bool countEntry = !countDirectoriesOnly || dirEntry->d_type == DT_DIR || dirEntry->d_type == DT_LNK || dirEntry->d_type == DT_UNKNOWN; if (countEntry) { ++count; } @@ -84,7 +79,7 @@ KDirectoryContentsCounterWorker::CountResult walkDir(const QString &dirPath, } #endif -KDirectoryContentsCounterWorker::CountResult KDirectoryContentsCounterWorker::subItemsCount(const QString& path, Options options) +KDirectoryContentsCounterWorker::CountResult KDirectoryContentsCounterWorker::subItemsCount(const QString &path, Options options) { const bool countHiddenFiles = options & CountHiddenFiles; const bool countDirectoriesOnly = options & CountDirectoriesOnly; @@ -111,7 +106,7 @@ KDirectoryContentsCounterWorker::CountResult KDirectoryContentsCounterWorker::su #endif } -void KDirectoryContentsCounterWorker::countDirectoryContents(const QString& path, Options options) +void KDirectoryContentsCounterWorker::countDirectoryContents(const QString &path, Options options) { auto res = subItemsCount(path, options); Q_EMIT result(path, res.count, res.size); |
