forked from qt-creator/qt-creator
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user