[Pkg-owncloud-commits] [owncloud-client] 10/115: Selective sync: remember the old list when accepting the dialog even if the tree was not expanded
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri Aug 29 22:03:54 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 b25ef28e82e85db7f34d81f3ff89fa771a9b1162
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Tue Aug 12 11:12:58 2014 +0200
Selective sync: remember the old list when accepting the dialog even if the tree was not expanded
---
src/mirall/selectivesyncdialog.cpp | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/mirall/selectivesyncdialog.cpp b/src/mirall/selectivesyncdialog.cpp
index 56d3999..ceeba0e 100644
--- a/src/mirall/selectivesyncdialog.cpp
+++ b/src/mirall/selectivesyncdialog.cpp
@@ -229,8 +229,17 @@ QStringList SelectiveSyncDialog::createWhiteList(QTreeWidgetItem* root) const
}
QStringList result;
- for (int i = 0; i < root->childCount(); ++i) {
- result += createWhiteList(root->child(i));
+ if (root->childCount()) {
+ for (int i = 0; i < root->childCount(); ++i) {
+ result += createWhiteList(root->child(i));
+ }
+ } else {
+ // We did not load from the server so we re-use the one from the old white list
+ QString path = root->data(0, Qt::UserRole).toString();
+ foreach (const QString & it, _folder->selectiveSyncList()) {
+ if (it.startsWith(path))
+ result += it;
+ }
}
return result;
}
--
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