+void KFileItemModelRolesUpdater::startDirectorySizeCounting(const KFileItem &item, int index)
+{
+ // Tell m_directoryContentsCounter that we want to count the items
+ // inside the directory. The result will be received in slotDirectoryContentsCountReceived.
+ if (m_scanDirectories && item.isLocalFile()) {
+ const QString path = item.localPath();
+ const auto priority = index >= m_firstVisibleIndex && index <= m_lastVisibleIndex ? KDirectoryContentsCounter::PathCountPriority::High
+ : KDirectoryContentsCounter::PathCountPriority::Normal;
+ m_directoryContentsCounter->scanDirectory(path, priority);
+ }
+}
+
+QHash<QByteArray, QVariant> KFileItemModelRolesUpdater::rolesData(const KFileItem &item, int index)