kfilesystemtype: use libmount instead of statfs when available

I traced the freeze to this statfs call by crashing dolphin during the freeze.

#0 0x00007f19ff4f57fb statfs (libc.so.6 + 0xe87fb)
#1 0x00007f1a01b89fe3 _ZN15KFileSystemType14fileSystemTypeERK7QString (libKF6CoreAddons.so.6 + 0x52fe3)
#2 0x00007f1a01b7d1c4 _ZN16KDirWatchPrivate8addWatchEPNS_5EntryE (libKF6CoreAddons.so.6 + 0x461c4)
#3 0x00007f1a01b7dc91 _ZN16KDirWatchPrivate8addEntryEP9KDirWatchRK7QStringPNS_5EntryEb6QFlagsINS0_9WatchModeEE (libKF6CoreAddons.so.6 + 0x46c91)
#4 0x00007f1a0239ec5d _ZN19KCoreDirListerCache7listDirEP14KCoreDirListerRK4QUrlbb.isra.0 (libKF6KIOCore.so.6 + 0xb2c5d)
#5 0x00007f1a023b19e2 _ZN14KCoreDirLister7openUrlERK4QUrl6QFlagsINS_11OpenUrlFlagEE (libKF6KIOCore.so.6 + 0xc59e2) 

The better way would have been to fix that check happening on Dolphins’s main thread, but that seemed like a bigger thing (and I’m not yet competent enough to do that). But using more modern approaches, like using libmount doesn’t hurt, I thought.

I’d love to have used KMountPoint, but that lives in KIO...

Before After
Bildschirmaufnahme_20260112_215405.webm Bildschirmaufnahme_20260112_215646.webm

BUG:433611

Edited by Oliver Schramm

Merge request reports

Loading