diff options
author | Christian Kamm <mail@ckamm.de> | 2017-11-29 14:04:01 +0300 |
---|---|---|
committer | ckamm <mail@ckamm.de> | 2017-12-07 16:38:21 +0300 |
commit | 7ab127ad53311b2a43cb17894e17e45a5451b7cb (patch) | |
tree | 2e51da208c2dfcf6695225b2f6c1cad655de8e3e /src/gui/selectivesyncdialog.cpp | |
parent | dd91f4a86ef83893b5c5260d5148246f7fc2be2d (diff) |
Excludes: Refactor for pending improvements
Make ExcludedFiles something that is instantiated outside of
the CSYNC context and then given to it as a hook.
ExcludedFiles still lives in csync_exclude and the internal
workings haven't been touched.
Diffstat (limited to 'src/gui/selectivesyncdialog.cpp')
-rw-r--r-- | src/gui/selectivesyncdialog.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/selectivesyncdialog.cpp b/src/gui/selectivesyncdialog.cpp index 87d2bdc22..961894c08 100644 --- a/src/gui/selectivesyncdialog.cpp +++ b/src/gui/selectivesyncdialog.cpp @@ -14,7 +14,6 @@ #include "selectivesyncdialog.h" #include "folder.h" #include "account.h" -#include "excludedfiles.h" #include "networkjobs.h" #include "theme.h" #include "folderman.h" @@ -95,6 +94,9 @@ SelectiveSyncWidget::SelectiveSyncWidget(AccountPtr account, QWidget *parent) _folderTree->header()->setStretchLastSection(true); _folderTree->headerItem()->setText(0, tr("Name")); _folderTree->headerItem()->setText(1, tr("Size")); + + ConfigFile::setupDefaultExcludeFilePaths(_excludedFiles); + _excludedFiles.reloadExcludeFiles(); } QSize SelectiveSyncWidget::sizeHint() const @@ -204,7 +206,7 @@ void SelectiveSyncWidget::slotUpdateDirectories(QStringList list) QMutableListIterator<QString> it(list); while (it.hasNext()) { it.next(); - if (ExcludedFiles::instance().isExcluded(it.value(), pathToRemove, FolderMan::instance()->ignoreHiddenFiles())) + if (_excludedFiles.isExcluded(it.value(), pathToRemove, FolderMan::instance()->ignoreHiddenFiles())) it.remove(); } |