Skip to content
Snippets Groups Projects
Commit 01c22d80 authored by Kai Koehne's avatar Kai Koehne
Browse files

Also watch sub-directories for changes

parent 2181a93a
No related branches found
No related tags found
No related merge requests found
......@@ -109,6 +109,7 @@ void FileFilterBaseItem::updateFileList()
const QSet<QString> watchedDirectories = m_fsWatcher.directories().toSet();
const QSet<QString> unwatchDirs = watchedDirectories - dirsToBeWatched;
const QSet<QString> watchDirs = dirsToBeWatched - watchedDirectories;
if (!unwatchDirs.isEmpty())
m_fsWatcher.removePaths(unwatchDirs.toList());
if (!watchDirs.isEmpty())
......@@ -130,7 +131,7 @@ QSet<QString> FileFilterBaseItem::filesInSubTree(const QDir &rootDir, const QDir
if (m_recursive) {
foreach (const QFileInfo &subDir, dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot)) {
fileSet += filesInSubTree(rootDir, QDir(subDir.absoluteFilePath()));
fileSet += filesInSubTree(rootDir, QDir(subDir.absoluteFilePath()), parsedDirs);
}
}
return fileSet;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment