X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/5f57256a2f293622c7a10844adae29190907b9eb..e6ea3ab4c41dcc115143a237aafd3a1152849433:/src/kitemviews/private/kdirectorycontentscounterworker.h diff --git a/src/kitemviews/private/kdirectorycontentscounterworker.h b/src/kitemviews/private/kdirectorycontentscounterworker.h index 2460a0e1f..fac9978d5 100644 --- a/src/kitemviews/private/kdirectorycontentscounterworker.h +++ b/src/kitemviews/private/kdirectorycontentscounterworker.h @@ -17,8 +17,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ -#ifndef KDIRECTORYCONTENTENTSCOUNTERWORKER_H -#define KDIRECTORYCONTENTENTSCOUNTERWORKER_H +#ifndef KDIRECTORYCONTENTSCOUNTERWORKER_H +#define KDIRECTORYCONTENTSCOUNTERWORKER_H #include #include @@ -37,6 +37,14 @@ public: }; Q_DECLARE_FLAGS(Options, Option) + struct CountResult { + /// number of elements in the directory + int count; + /// Recursive sum of the size of the directory content files and folders + /// Calculation depends on DetailsModeSettings::recursiveDirectorySizeLimit + long size; + }; + explicit KDirectoryContentsCounterWorker(QObject* parent = nullptr); /** @@ -45,13 +53,13 @@ public: * * @return The number of items. */ - static int subItemsCount(const QString& path, Options options); + static CountResult subItemsCount(const QString& path, Options options); signals: /** - * Signals that the directory \a path contains \a count items. + * Signals that the directory \a path contains \a count items and optionally the size of its content. */ - void result(const QString& path, int count); + void result(const QString& path, int count, long size); public slots: /**