D23420: Use solid to check if a KFileItem is located on a network mount

David Faure noreply at phabricator.kde.org
Wed Aug 28 08:11:40 BST 2019


dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> broulik wrote in kfileitem.cpp:766
> If you have a location `/home/foo/foobar` and a slow mount `/home/foo/foo`, it will consider it slow because "starts with"

But going via QUrl to fix this seems overkill to me.

It would be much faster to do this with the usual "location==mount or location.startsWith(mount+'/')".

I'm afraid this code will be called often (many KFileItems) and has to iterate over all mounts every time, so this is N*M.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D23420

To: meven, dfaure, #frameworks
Cc: broulik, anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190828/78b18ff1/attachment.html>


More information about the Kde-frameworks-devel mailing list