diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -151,6 +151,7 @@ KF5::I18n KF5::Crash KF5::DBusAddons # KDEInitInterface + KF5::Solid ) if (UNIX) diff --git a/src/core/kfileitem.cpp b/src/core/kfileitem.cpp --- a/src/core/kfileitem.cpp +++ b/src/core/kfileitem.cpp @@ -41,7 +41,9 @@ #include #include #endif -#include +#include +#include +#include class KFileItemPrivate : public QSharedData { @@ -758,13 +760,17 @@ { if (m_slow == SlowUnknown) { const QString path = localPath(); - if (!path.isEmpty()) { - const KFileSystemType::Type fsType = KFileSystemType::fileSystemType(path); - m_slow = (fsType == KFileSystemType::Nfs || fsType == KFileSystemType::Smb) ? Slow : Fast; - } else { - m_slow = Slow; + const QList devices = Solid::Device::listFromType(Solid::DeviceInterface::NetworkShare); + for (Solid::Device device : devices) { + const Solid::StorageAccess *storageAccess = device.as(); + if (path.startsWith(storageAccess->filePath())) { + m_slow = Slow; + return true; + } } + m_slow = Fast; } + return m_slow == Slow; }