Prevents warnings

Warnings such as :
kf5.kio.core: Invalid URL: QUrl("")

It happened for instance with recentlyused:/ ioslave
This commit is contained in:
Méven Car 2020-05-29 19:35:02 +02:00 committed by Elvis Angelaccio
parent 8aa7cde289
commit 770d083182

View file

@ -1522,6 +1522,10 @@ void DolphinView::calculateItemCount(int& fileCount,
bool countFileSize = true;
if (!m_model->rootItem().url().isValid()) {
return;
}
// In case we have a precomputed value
const auto job = KIO::statDetails(m_model->rootItem().url(), KIO::StatJob::SourceSide, KIO::StatRecursiveSize, KIO::HideProgressInfo);
job->exec();