Mercurial > hg > easyhg
diff src/fswatcher.h @ 540:fc2df97920e8 fswatcher
Introduce FsWatcher into main window (though it isn't fully rigged up yet)
author | Chris Cannam |
---|---|
date | Mon, 13 Feb 2012 17:29:06 +0000 |
parents | 3935a7e621ca |
children | 0a16db274f2c |
line wrap: on
line diff
--- a/src/fswatcher.h Fri Feb 10 21:49:27 2012 +0000 +++ b/src/fswatcher.h Mon Feb 13 17:29:06 2012 +0000 @@ -96,6 +96,12 @@ // call with lock already held bool shouldIgnore(QString path); + // call with lock already held. Returns set of non-ignored files in dir + QSet<QString> scanDirectory(QString path); + + // call with lock already held + void debugPrint(); + private: /** * A change associates a filename with a counter (the @@ -116,6 +122,15 @@ */ QMap<int, size_t> m_tokenMap; + /** + * Associates a directory path with a list of all the files in it + * that do not match our ignore patterns. When a directory is + * signalled as having changed, then we need to rescan it and + * compare against this list before we can determine whether to + * notify about the change or not. + */ + QHash<QString, QSet<QString> > m_dirContents; + QStringList m_ignoredPrefixes; QStringList m_ignoredSuffixes;