From 770d083182fdcc85c5aad7d686cc5f4aa772f3e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ven=20Car?= Date: Fri, 29 May 2020 19:35:02 +0200 Subject: [PATCH] Prevents warnings Warnings such as : kf5.kio.core: Invalid URL: QUrl("") It happened for instance with recentlyused:/ ioslave --- src/views/dolphinview.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index fc036bce29..c827f5768e 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();