diff src/fswatcher.h @ 584:09b9849b9800 fswatcher

Make a start with explicit FSEvents support on OS/X (see long comment added in this commit). Note that this branch doesn't currently build.
author Chris Cannam
date Mon, 12 Mar 2012 17:25:41 +0000
parents 533519ebc0cb
children fa242885a233
line wrap: on
line diff
--- a/src/fswatcher.h	Mon Mar 12 14:58:40 2012 +0000
+++ b/src/fswatcher.h	Mon Mar 12 17:25:41 2012 +0000
@@ -25,7 +25,12 @@
 #include <QHash>
 #include <QMap>
 #include <QStringList>
+
+#ifndef Q_OS_MAC
+// We don't use QFileSystemWatcher on OS/X.
+// See comments at top of fswatcher.cpp for an explanation.
 #include <QFileSystemWatcher>
+#endif
 
 class FsWatcher : public QObject
 {
@@ -93,6 +98,9 @@
 
 private:
     // call with lock already held
+    void clearWatchedPaths();
+
+    // call with lock already held
     void addWorkDirectory(QString path);
 
     // call with lock already held
@@ -142,7 +150,12 @@
     QString m_workDirPath;
     int m_lastToken;
     size_t m_lastCounter;
+
+#ifdef Q_OS_MAC
+    void *m_stream;
+#else
     QFileSystemWatcher m_watcher;
+#endif
 };
 
 #endif