diff options
author | Jocelyn Turcotte <jturcotte@woboq.com> | 2016-03-16 21:07:40 +0300 |
---|---|---|
committer | Jocelyn Turcotte <jturcotte@woboq.com> | 2016-03-28 14:07:28 +0300 |
commit | df386b64ba88c70f13cae2514e3dacda8540fb6a (patch) | |
tree | c0d25bbdf8d1a4dc658bf4c38c47d2e46904d6fa /src/gui/selectivesyncdialog.cpp | |
parent | 80bd86a305f594c3846822c780f28edd3c860ba2 (diff) |
Make the AccountState a construction argument of the Folder
This will help moving the SyncEngine construction in the constructor
and allow moving functionalities from Folder to SyncEngine or its
delegated objects.
Diffstat (limited to 'src/gui/selectivesyncdialog.cpp')
-rw-r--r-- | src/gui/selectivesyncdialog.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/gui/selectivesyncdialog.cpp b/src/gui/selectivesyncdialog.cpp index a6a80bd47..62461740c 100644 --- a/src/gui/selectivesyncdialog.cpp +++ b/src/gui/selectivesyncdialog.cpp @@ -14,6 +14,7 @@ #include "selectivesyncdialog.h" #include "folder.h" #include "account.h" +#include "excludedfiles.h" #include "networkjobs.h" #include "theme.h" #include "folderman.h" @@ -176,21 +177,11 @@ void SelectiveSyncTreeView::slotUpdateDirectories(QStringList list) pathToRemove.append('/'); // Check for excludes. - // - // We would like to use Folder::isFileExcluded, but the folder doesn't - // exist yet. So we just create one temporarily... - FolderDefinition def; - def.localPath = pathToRemove; - def.ignoreHiddenFiles = FolderMan::instance()->ignoreHiddenFiles(); - Folder f(def); QMutableListIterator<QString> it(list); while (it.hasNext()) { it.next(); - QString path = it.value(); - path.remove(pathToRemove); - if (f.isFileExcludedRelative(path)) { + if (ExcludedFiles::instance().isExcluded(it.value(), pathToRemove, FolderMan::instance()->ignoreHiddenFiles())) it.remove(); - } } // Since / cannot be in the blacklist, expand it to the actual |