Mercurial > hg > easyhg
comparison 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 |
comparison
equal
deleted
inserted
replaced
539:3935a7e621ca | 540:fc2df97920e8 |
---|---|
94 void addWorkDirectory(QString path); | 94 void addWorkDirectory(QString path); |
95 | 95 |
96 // call with lock already held | 96 // call with lock already held |
97 bool shouldIgnore(QString path); | 97 bool shouldIgnore(QString path); |
98 | 98 |
99 // call with lock already held. Returns set of non-ignored files in dir | |
100 QSet<QString> scanDirectory(QString path); | |
101 | |
102 // call with lock already held | |
103 void debugPrint(); | |
104 | |
99 private: | 105 private: |
100 /** | 106 /** |
101 * A change associates a filename with a counter (the | 107 * A change associates a filename with a counter (the |
102 * size_t). Each time a file is changed, its counter is assigned | 108 * size_t). Each time a file is changed, its counter is assigned |
103 * from m_lastCounter and m_lastCounter is incremented. | 109 * from m_lastCounter and m_lastCounter is incremented. |
114 * getChangedPaths last completed for that token. Any files in | 120 * getChangedPaths last completed for that token. Any files in |
115 * m_changes whose counters are larger must have been modified. | 121 * m_changes whose counters are larger must have been modified. |
116 */ | 122 */ |
117 QMap<int, size_t> m_tokenMap; | 123 QMap<int, size_t> m_tokenMap; |
118 | 124 |
125 /** | |
126 * Associates a directory path with a list of all the files in it | |
127 * that do not match our ignore patterns. When a directory is | |
128 * signalled as having changed, then we need to rescan it and | |
129 * compare against this list before we can determine whether to | |
130 * notify about the change or not. | |
131 */ | |
132 QHash<QString, QSet<QString> > m_dirContents; | |
133 | |
119 QStringList m_ignoredPrefixes; | 134 QStringList m_ignoredPrefixes; |
120 QStringList m_ignoredSuffixes; | 135 QStringList m_ignoredSuffixes; |
121 | 136 |
122 /// Everything in this class is synchronised. | 137 /// Everything in this class is synchronised. |
123 QMutex m_mutex; | 138 QMutex m_mutex; |