Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <kamm@incasoftware.de>2014-11-07 12:53:41 +0300
committerChristian Kamm <kamm@incasoftware.de>2014-11-20 14:51:16 +0300
commit6d09f1b6c0def213fe8ffa2e3bfa91151b62efb6 (patch)
tree245e634ca71361e711f46fbfa6a01ed73c7f907d /src/gui/folderwatcher.cpp
parent1ada20ac7b50e5480036c9906199219df13328f4 (diff)
Folder watcher now reports changing paths instead of dirs.
Diffstat (limited to 'src/gui/folderwatcher.cpp')
-rw-r--r--src/gui/folderwatcher.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/gui/folderwatcher.cpp b/src/gui/folderwatcher.cpp
index cb4a4209d..047ec8c09 100644
--- a/src/gui/folderwatcher.cpp
+++ b/src/gui/folderwatcher.cpp
@@ -130,7 +130,7 @@ void FolderWatcher::changeDetected( const QStringList& paths )
_lastPaths = pathsSet;
_timer.restart();
- QSet<QString> changedFolders;
+ QSet<QString> changedPaths;
// ------- handle ignores:
for (int i = 0; i < paths.size(); ++i) {
@@ -139,20 +139,15 @@ void FolderWatcher::changeDetected( const QStringList& paths )
continue;
}
- QFileInfo fi(path);
- if (fi.isDir()) {
- changedFolders.insert(path);
- } else {
- changedFolders.insert(fi.dir().path());
- }
+ changedPaths.insert(path);
}
- if (changedFolders.isEmpty()) {
+ if (changedPaths.isEmpty()) {
return;
}
- qDebug() << "detected changes in folders:" << changedFolders;
- foreach (const QString &path, changedFolders) {
- emit folderChanged(path);
+ qDebug() << "detected changes in paths:" << changedPaths;
+ foreach (const QString &path, changedPaths) {
+ emit pathChanged(path);
}
}