Don't ask to reload the file, if the user uses git/undo or git/revert.

Simply do it.

Task-Nr: 254558
This commit is contained in:
dt
2009-06-18 14:30:04 +02:00
parent 69d04bc069
commit 4637d56284
6 changed files with 67 additions and 26 deletions

View File

@@ -136,6 +136,25 @@ private:
bool m_blockActivated;
};
/*! The FileChangeBlocker blocks all change notifications to all IFile * that
match the given filename. And unblocks in the destructor.
To also reload the IFile in the destructor class set modifiedReload to true
*/
class CORE_EXPORT FileChangeBlocker
{
public:
FileChangeBlocker(const QString &fileName);
~FileChangeBlocker();
void setModifiedReload(bool reload);
bool modifiedReload() const;
private:
QList<IFile *> m_files;
bool m_reload;
Q_DISABLE_COPY(FileChangeBlocker);
};
} // namespace Core
#endif // FILEMANAGER_H