[Pkg-owncloud-commits] [owncloud-client] 19/219: Selective sync dialog: fix fetching sub directory when the folder is not the root folder
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:04 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 7950b49cb1b7654d1de32529040322d19104aead
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Wed Aug 27 17:18:40 2014 +0200
Selective sync dialog: fix fetching sub directory when the folder is not the root folder
---
src/mirall/selectivesyncdialog.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/mirall/selectivesyncdialog.cpp b/src/mirall/selectivesyncdialog.cpp
index c687798..b501d54 100644
--- a/src/mirall/selectivesyncdialog.cpp
+++ b/src/mirall/selectivesyncdialog.cpp
@@ -107,7 +107,7 @@ void SelectiveSyncTreeView::slotUpdateDirectories(const QStringList&list)
root = new QTreeWidgetItem(this);
root->setText(0, _rootName);
root->setIcon(0, Theme::instance()->applicationIcon());
- root->setData(0, Qt::UserRole, _folderPath);
+ root->setData(0, Qt::UserRole, QString());
if (_oldBlackList.isEmpty()) {
root->setCheckState(0, Qt::Checked);
} else {
@@ -139,7 +139,12 @@ void SelectiveSyncTreeView::slotUpdateDirectories(const QStringList&list)
void SelectiveSyncTreeView::slotItemExpanded(QTreeWidgetItem *item)
{
QString dir = item->data(0, Qt::UserRole).toString();
- LsColJob *job = new LsColJob(AccountManager::instance()->account(), dir, this);
+ if (dir.isEmpty()) return;
+ QString prefix;
+ if (!_folderPath.isEmpty()) {
+ prefix = _folderPath + QLatin1Char('/');
+ }
+ LsColJob *job = new LsColJob(AccountManager::instance()->account(), prefix + dir, this);
connect(job, SIGNAL(directoryListing(QStringList)),
SLOT(slotUpdateDirectories(QStringList)));
job->start();
--
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