[Pkg-owncloud-commits] [owncloud-client] 89/484: SelectiveSyncTreeView: show the size for the root item (#3755)

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:19 UTC 2015


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 5cac90b3eb0a5afac72cd375950b6b143b9bcfee
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Oct 19 10:58:54 2015 +0200

    SelectiveSyncTreeView: show the size for the root item (#3755)
---
 src/gui/selectivesyncdialog.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gui/selectivesyncdialog.cpp b/src/gui/selectivesyncdialog.cpp
index 021e005..1b693ed 100644
--- a/src/gui/selectivesyncdialog.cpp
+++ b/src/gui/selectivesyncdialog.cpp
@@ -159,7 +159,6 @@ void SelectiveSyncTreeView::recursiveInsert(QTreeWidgetItem* parent, QStringList
 void SelectiveSyncTreeView::slotUpdateDirectories(QStringList list)
 {
     auto job = qobject_cast<LsColJob *>(sender());
-
     QScopedValueRollback<bool> isInserting(_inserting);
     _inserting = true;
 
@@ -222,6 +221,11 @@ void SelectiveSyncTreeView::slotUpdateDirectories(QStringList list)
         } else {
             root->setCheckState(0, Qt::PartiallyChecked);
         }
+        qint64 size = job ? job->_sizes.value(pathToRemove, -1) : -1;
+        if (size >= 0) {
+            root->setText(1, Utility::octetsToString(size));
+            root->setData(1, Qt::UserRole, size);
+        }
     }
 
     foreach (QString path, list) {

-- 
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