comparison src/fswatcher.h @ 586:687d9e700e81 fswatcher

Check file timestamps for tracked files when a directory change is notified from FSEvents
author Chris Cannam
date Wed, 14 Mar 2012 11:40:58 +0000
parents fa242885a233
children ae67ea0af696
comparison
equal deleted inserted replaced
585:fa242885a233 586:687d9e700e81
22 #include <QMutex> 22 #include <QMutex>
23 #include <QString> 23 #include <QString>
24 #include <QSet> 24 #include <QSet>
25 #include <QHash> 25 #include <QHash>
26 #include <QMap> 26 #include <QMap>
27 #include <QDateTime>
27 #include <QStringList> 28 #include <QStringList>
28 29
29 #ifndef Q_OS_MAC 30 #ifndef Q_OS_MAC
30 // We don't use QFileSystemWatcher on OS/X. 31 // We don't use QFileSystemWatcher on OS/X.
31 // See comments at top of fswatcher.cpp for an explanation. 32 // See comments at top of fswatcher.cpp for an explanation.
151 int m_lastToken; 152 int m_lastToken;
152 size_t m_lastCounter; 153 size_t m_lastCounter;
153 154
154 #ifdef Q_OS_MAC 155 #ifdef Q_OS_MAC
155 void *m_stream; 156 void *m_stream;
157 typedef QMap<QString, QDateTime> PathTimeMap;
158 PathTimeMap m_trackedFileUpdates;
159 bool manuallyCheckTrackedFiles();
156 #else 160 #else
157 QFileSystemWatcher m_watcher; 161 QFileSystemWatcher m_watcher;
158 #endif 162 #endif
159 }; 163 };
160 164