improve file change notification suppression in saveFile()

for one, entirely stop monitoring the own IFile.
second, expect changes on the filename - in case other IFiles use it as
well.
these two ensure that nothing weird happens, especially if we show a dialog
and thus enter an event loop.
This commit is contained in:
Oswald Buddenhagen
2011-04-15 21:23:21 +02:00
parent 2dd1f0d83d
commit 9e6448d38d
2 changed files with 17 additions and 39 deletions

View File

@@ -74,7 +74,7 @@ public:
// file pool to monitor
void addFiles(const QList<IFile *> &files, bool addWatcher = true);
void addFile(IFile *file, bool addWatcher = true);
void removeFile(IFile *file);
bool removeFile(IFile *file);
QList<IFile *> modifiedFiles() const;
void renamedFile(const QString &from, const QString &to);
@@ -159,7 +159,6 @@ private:
void addFileInfo(const QString &fileName, IFile *file, bool isLink);
void removeFileInfo(IFile *file);
void updateFileInfo(IFile *file);
void updateExpectedState(const QString &fileName);
QList<IFile *> saveModifiedFiles(const QList<IFile *> &files,