From: Méven Car Date: Fri, 29 May 2020 17:35:02 +0000 (+0200) Subject: Prevents warnings X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/770d083182fdcc85c5aad7d686cc5f4aa772f3e7 Prevents warnings Warnings such as : kf5.kio.core: Invalid URL: QUrl("") It happened for instance with recentlyused:/ ioslave --- diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index fc036bce2..c827f5768 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -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();