diff options
author | Christian Kamm <mail@ckamm.de> | 2019-03-05 15:20:09 +0300 |
---|---|---|
committer | Christian Kamm <mail@ckamm.de> | 2019-03-14 10:14:27 +0300 |
commit | cb5a76729a65f6a474637a2b1578c8aaa7c878c3 (patch) | |
tree | 7449711b28cf57272ec93160a96187a0d9cd9d31 /src/gui/folderwatcher.h | |
parent | 7d34d3bc76664a419db71609e7864aae4799706f (diff) |
FolderWatcher linux: Make automatically recursive #7068
Previously it depended on addFolder() / removeFolder() calls to adjust
watchers when new folders were added or removed. There also needed to be
complex move handling.
Now, any folder creation/move-in notifications automatically trigger
watcher additions and folder deletion/move-out triggers removal.
Diffstat (limited to 'src/gui/folderwatcher.h')
-rw-r--r-- | src/gui/folderwatcher.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/gui/folderwatcher.h b/src/gui/folderwatcher.h index fcae5c837..8e28efe65 100644 --- a/src/gui/folderwatcher.h +++ b/src/gui/folderwatcher.h @@ -43,11 +43,6 @@ class Folder; * for changes in the local file system. Changes are signalled * through the pathChanged() signal. * - * Note that if new folders are created, this folderwatcher class - * does not automatically add them to the list of monitored - * dirs. That is the responsibility of the user of this class to - * call addPath() with the new dir. - * * @ingroup gui */ @@ -64,14 +59,6 @@ public: */ void init(const QString &root); - /** - * 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 backends that are recursive - */ - void addPath(const QString &); - void removePath(const QString &); - /* Check if the path is ignored. */ bool pathIsIgnored(const QString &path); @@ -84,6 +71,9 @@ public: */ bool isReliable() const; + /// For testing linux behavior only + int testLinuxWatchCount() const; + signals: /** Emitted when one of the watched directories or one * of the contained files is changed. */ |