-int KDirectoryContentsCounter::countDirectoryContentsSynchronously(const QString& path)
-{
- const QString resolvedPath = QFileInfo(path).canonicalFilePath();
-
- if (!m_dirWatcher->contains(resolvedPath)) {
- m_dirWatcher->addDir(resolvedPath);
- m_watchedDirs.insert(resolvedPath);
- }
-
- KDirectoryContentsCounterWorker::Options options;
-
- if (m_model->showHiddenFiles()) {
- options |= KDirectoryContentsCounterWorker::CountHiddenFiles;
- }
-
- if (m_model->showDirectoriesOnly()) {
- options |= KDirectoryContentsCounterWorker::CountDirectoriesOnly;
- }
-
- return KDirectoryContentsCounterWorker::subItemsCount(path, options);
-}
-
-void KDirectoryContentsCounter::slotResult(const QString& path, int count)