Qt4Project: Avoid warnings from QFileSystemWatcher

Reviewed-By: Thorbjorn
This commit is contained in:
dt
2010-10-13 14:44:32 +02:00
parent 80f3059212
commit 47310350a1

View File

@@ -1260,7 +1260,11 @@ void CentralizedFolderWatcher::folderChanged(const QString &folder)
if (!tmp.isEmpty()) {
if (debugCFW)
qDebug()<<"found new recursive dirs"<<tmp;
m_watcher.addPaths(tmp.toList());
QSet<QString> alreadyAdded = m_watcher.directories().toSet();
tmp.subtract(alreadyAdded);
if (!tmp.isEmpty())
m_watcher.addPaths(tmp.toList());
m_recursiveWatchedFolders += tmp;
}
}