diff options
author | Christian Kamm <mail@ckamm.de> | 2015-10-02 10:40:44 +0300 |
---|---|---|
committer | Christian Kamm <mail@ckamm.de> | 2015-10-02 16:56:39 +0300 |
commit | 7d1886684ebb5875d9ae408760056a4152257b99 (patch) | |
tree | 9fe7fbfdce2f4c5702d11e9aa9d78071e251081c /src/gui/folderwatcher.h | |
parent | 95fc792745f3604dc787b35ee12fc1ff7cbcbab7 (diff) |
FolderWatcher: Use csync exclude code #3805
Introduce a global ExcludedFiles instance to avoid loading the global
exclude lists several times.
One could still add per-folder exclude lists by checking these after
the global ones.
Diffstat (limited to 'src/gui/folderwatcher.h')
-rw-r--r-- | src/gui/folderwatcher.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/gui/folderwatcher.h b/src/gui/folderwatcher.h index b0f529940..c4526408e 100644 --- a/src/gui/folderwatcher.h +++ b/src/gui/folderwatcher.h @@ -30,6 +30,7 @@ class QTimer; namespace OCC { class FolderWatcherPrivate; +class Folder; /** * @brief Montiors a directory recursively for changes @@ -53,20 +54,10 @@ public: /** * @param root Path of the root of the folder */ - FolderWatcher(const QString &root, QObject *parent = 0L); + FolderWatcher(const QString &root, Folder* folder = 0L); virtual ~FolderWatcher(); /** - * Set a file name to load a file with ignore patterns. - * - * Valid entries do not start with a hash sign (#) - * and may contain wildcards - */ - void addIgnoreListFile( const QString& ); - - QStringList ignores() const; - - /** * Not all backends are recursive by default. * Those need to be notified when a directory is added or removed while the watcher is disabled. * This is a no-op for backend that are recursive @@ -77,10 +68,6 @@ public: /* Check if the path is ignored. */ bool pathIsIgnored( const QString& path ); - /* set if the folderwatcher ignores events of hidden files */ - void setIgnoreHidden(bool ignore); - bool ignoreHidden(); - signals: /** Emitted when one of the watched directories or one * of the contained files is changed. */ @@ -99,10 +86,9 @@ protected: private: QScopedPointer<FolderWatcherPrivate> _d; - QStringList _ignores; QTime _timer; QSet<QString> _lastPaths; - bool _ignoreHidden; + Folder* _folder; friend class FolderWatcherPrivate; }; |