From 01c22d803bb4441fc7e0169f6036840003425ed9 Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@nokia.com>
Date: Tue, 19 Jan 2010 17:01:08 +0100
Subject: [PATCH] Also watch sub-directories for changes

---
 src/plugins/qmlprojectmanager/fileformat/filefilteritems.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/plugins/qmlprojectmanager/fileformat/filefilteritems.cpp b/src/plugins/qmlprojectmanager/fileformat/filefilteritems.cpp
index 496d075703b..bd9ddfd3e17 100644
--- a/src/plugins/qmlprojectmanager/fileformat/filefilteritems.cpp
+++ b/src/plugins/qmlprojectmanager/fileformat/filefilteritems.cpp
@@ -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;
-- 
GitLab