Reduce file watchers.

Do not add file watchers on editors with temporary files (VCS
diff/commit. etc). Add a flag to FileManager::addFile() specifying
if one wants a watcher.
Acked-by: con <qtc-committer@nokia.com>
This commit is contained in:
Friedemann Kleint
2010-02-26 17:20:32 +01:00
parent 2a35bb7949
commit 0239a3822c
3 changed files with 44 additions and 28 deletions

View File

@@ -57,8 +57,8 @@ public:
virtual ~FileManager();
// file pool to monitor
bool addFiles(const QList<IFile *> &files);
bool addFile(IFile *file);
bool addFiles(const QList<IFile *> &files, bool addWatcher = true);
bool addFile(IFile *file, bool addWatcher = true);
bool removeFile(IFile *file);
bool isFileManaged(const QString &fileName) const;
QList<IFile *> modifiedFiles() const;
@@ -128,7 +128,7 @@ private slots:
void syncWithEditor(Core::IContext *context);
private:
void addFileInfo(IFile *file);
void addFileInfo(IFile *file, bool addWatcher = true);
void removeFileInfo(IFile *file);
void removeFileInfo(const QString &fileName, IFile *file);