mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
Fix discrepancy in total size between statusbar and infosidebarpage; reported by _mika, approved by Peter.
svn path=/trunk/KDE/kdebase/apps/; revision=750121
This commit is contained in:
parent
fe09a37c59
commit
00bded7c8d
|
@ -333,8 +333,9 @@ void InfoSidebarPage::showMetaInfo()
|
||||||
|
|
||||||
unsigned long int totalSize = 0;
|
unsigned long int totalSize = 0;
|
||||||
foreach (const KFileItem& item, selectedItems) {
|
foreach (const KFileItem& item, selectedItems) {
|
||||||
// TODO: what to do with directories (same with the one-item-selected-code)?,
|
// Only count the size of files, not dirs; to match what
|
||||||
// item.size() does not return the size of the content : not very instinctive for users
|
// DolphinViewContainer::selectionStatusBarText does.
|
||||||
|
if (!item.isDir() && !item.isLink())
|
||||||
totalSize += item.size();
|
totalSize += item.size();
|
||||||
}
|
}
|
||||||
addInfoLine(text, i18nc("@label", "Total size:"), KIO::convertSize(totalSize));
|
addInfoLine(text, i18nc("@label", "Total size:"), KIO::convertSize(totalSize));
|
||||||
|
|
Loading…
Reference in a new issue