SelectiveSyncTreeView: show the size for the root item (#3755)

This commit is contained in:
Olivier Goffart 2015-10-19 10:58:54 +02:00
parent df135a0bb2
commit 5cac90b3eb

View file

@ -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) {