]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Allow statusbar and information panel to stat with KIO::StatRecursiveSize
authorMéven Car <meven29@gmail.com>
Sat, 18 Apr 2020 17:10:14 +0000 (19:10 +0200)
committerMéven Car <meven29@gmail.com>
Sat, 18 Apr 2020 17:16:52 +0000 (19:16 +0200)
Summary: Needed after D28901 to ensure we get the UDS_RECURSIVE_SIZE out of the stat calls.

Test Plan: Trash size is visible in status bar and information panel again.

Reviewers: ngraham, dfaure, #dolphin

Reviewed By: dfaure

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D28950

src/panels/information/informationpanel.cpp
src/views/dolphinview.cpp

index 23e7f1922b0b0625d719a60c26781d39721f509c..4f0e4e5eb80ff51e784f559f3a69991b66dd055d 100644 (file)
@@ -248,7 +248,7 @@ void InformationPanel::showItemInfo()
         if (item.isNull()) {
             // No item is hovered and no selection has been done: provide
             // an item for the currently shown directory.
-            m_folderStatJob = KIO::stat(url(), KIO::HideProgressInfo);
+            m_folderStatJob = KIO::statDetails(url(), KIO::StatJob::SourceSide, KIO::StatDefaultDetails | KIO::StatRecursiveSize, KIO::HideProgressInfo);
             if (m_folderStatJob->uiDelegate()) {
                 KJobWidgets::setWindow(m_folderStatJob, this);
             }
index 69309fcadea45737082581872a21e9825bd51925..a0dd0327b9ad461530953d6261b74a7c527b0f72 100644 (file)
@@ -1497,7 +1497,7 @@ void DolphinView::calculateItemCount(int& fileCount,
     bool countFileSize = true;
 
     // In case we have a precomputed value
-    const auto job = KIO::stat(m_model->rootItem().url());
+    const auto job = KIO::statDetails(m_model->rootItem().url(), KIO::StatJob::SourceSide, KIO::StatRecursiveSize);
     job->exec();
     const auto entry =  job->statResult();
     if (entry.contains(KIO::UDSEntry::UDS_RECURSIVE_SIZE)) {