[Pkg-owncloud-commits] [owncloud-client] 203/211: Selective sync ui: Fix #2390
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:45 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 1c4072e23179fb6f5e473ff010b70f5124a02199
Author: Christian Kamm <kamm at incasoftware.de>
Date: Fri Oct 24 15:46:35 2014 +0200
Selective sync ui: Fix #2390
---
src/mirall/selectivesyncdialog.cpp | 7 +++++--
src/mirall/selectivesyncdialog.h | 4 ++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/mirall/selectivesyncdialog.cpp b/src/mirall/selectivesyncdialog.cpp
index 23565cd..ffe7043 100644
--- a/src/mirall/selectivesyncdialog.cpp
+++ b/src/mirall/selectivesyncdialog.cpp
@@ -81,7 +81,7 @@ void SelectiveSyncTreeView::recursiveInsert(QTreeWidgetItem* parent, QStringList
|| parent->checkState(0) == Qt::PartiallyChecked) {
item->setCheckState(0, Qt::Checked);
foreach(const QString &str , _oldBlackList) {
- if (str + "/" == path) {
+ if (str == path) {
item->setCheckState(0, Qt::Unchecked);
break;
} else if (str.startsWith(path)) {
@@ -137,6 +137,9 @@ void SelectiveSyncTreeView::slotUpdateDirectories(const QStringList&list)
if (paths.last().isEmpty()) paths.removeLast();
if (paths.isEmpty())
continue;
+ if (!path.endsWith('/')) {
+ path.append('/');
+ }
recursiveInsert(root, paths, path);
}
root->setExpanded(true);
@@ -223,7 +226,7 @@ QStringList SelectiveSyncTreeView::createBlackList(QTreeWidgetItem* root) const
switch(root->checkState(0)) {
case Qt::Unchecked:
- return QStringList(root->data(0, Qt::UserRole).toString());
+ return QStringList(root->data(0, Qt::UserRole).toString() + "/");
case Qt::Checked:
return QStringList();
case Qt::PartiallyChecked:
diff --git a/src/mirall/selectivesyncdialog.h b/src/mirall/selectivesyncdialog.h
index 3bd5c09..cbd0511 100644
--- a/src/mirall/selectivesyncdialog.h
+++ b/src/mirall/selectivesyncdialog.h
@@ -29,8 +29,12 @@ class SelectiveSyncTreeView : public QTreeWidget {
Q_OBJECT
public:
explicit SelectiveSyncTreeView(Account *account, QWidget* parent = 0);
+
+ /// Returns a list of blacklisted paths, each including the trailing /
QStringList createBlackList(QTreeWidgetItem* root = 0) const;
void refreshFolders();
+
+ // oldBlackList is a list of excluded paths, each including a trailing /
void setFolderInfo(const QString &folderPath, const QString &rootName,
const QStringList &oldBlackList = QStringList()) {
_folderPath = folderPath;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list