diff options
author | Christian Kamm <mail@ckamm.de> | 2019-03-05 15:20:09 +0300 |
---|---|---|
committer | Camila (Rebase PR Action) <hello@camila.codes> | 2020-11-24 19:56:49 +0300 |
commit | 74382ddcc0f809fcd187e259d26c6e76e7f141d2 (patch) | |
tree | 90c0a9516b3385d3b6fd2f428aa94cf9f1633233 /src/gui/folderwatcher.cpp | |
parent | 21b931dc6b5d14565413c8fee432c5bd8a89c893 (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.cpp')
-rw-r--r-- | src/gui/folderwatcher.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/gui/folderwatcher.cpp b/src/gui/folderwatcher.cpp index 959c9cacd..68aa57e9c 100644 --- a/src/gui/folderwatcher.cpp +++ b/src/gui/folderwatcher.cpp @@ -86,6 +86,15 @@ void FolderWatcher::appendSubPaths(QDir dir, QStringList& subPaths) { } } +int FolderWatcher::testLinuxWatchCount() const +{ +#ifdef Q_OS_LINUX + return _d->testWatchCount(); +#else + return -1; +#endif +} + void FolderWatcher::changeDetected(const QString &path) { QFileInfo fileInfo(path); @@ -134,15 +143,4 @@ void FolderWatcher::changeDetected(const QStringList &paths) } } -void FolderWatcher::addPath(const QString &path) -{ - _d->addPath(path); -} - -void FolderWatcher::removePath(const QString &path) -{ - _d->removePath(path); -} - - } // namespace OCC |