diff mainwindow.h @ 238:e2f2c6e3c01b

* Attempt a different way of handling filesystem updates, that's more forgiving of fs changes caused by hg itself
author Chris Cannam
date Mon, 10 Jan 2011 13:30:19 +0000
parents c9a7e4ec2f78
children 661f5808aa0a
line wrap: on
line diff
--- a/mainwindow.h	Mon Jan 10 12:44:03 2011 +0000
+++ b/mainwindow.h	Mon Jan 10 13:30:19 2011 +0000
@@ -31,6 +31,7 @@
 QT_BEGIN_NAMESPACE
 class QAction;
 class QMenu;
+class QTimer;
 QT_END_NAMESPACE
 
 class MainWindow : public QMainWindow
@@ -60,6 +61,7 @@
 public slots:
     void open(QString local);
     void hgRefresh();
+    void commandStarting(HgAction);
     void commandCompleted(HgAction action, QString stdOut);
     void commandFailed(HgAction action, QString stdErr);
     void enableDisableActions();
@@ -104,6 +106,8 @@
 
     void fsDirectoryChanged(QString);
     void fsFileChanged(QString);
+    void checkFilesystem();
+    void actuallyRestoreFileSystemWatcher();
 
 private:
     void hgQueryBranch();
@@ -154,6 +158,8 @@
     void clearState();
 
     void updateFileSystemWatcher();
+    void suspendFileSystemWatcher();
+    void restoreFileSystemWatcher();
 
     bool firstStart;
 
@@ -210,6 +216,8 @@
     QString findEditorBinaryName();
 
     QFileSystemWatcher *fsWatcher;
+    QTimer *m_fsWatcherGeneralTimer;
+    QTimer *m_fsWatcherRestoreTimer;
 
     QString lastStatOutput;
     QStringList lastRevertedFiles;