D26407: KFileItem: Improve isSlow to not block when a network mount is unresponsive, make SkipMimeTypeFromContent skip only on slow fs

David Faure noreply at phabricator.kde.org
Sat Jan 18 11:31:20 GMT 2020


dfaure added inline comments.

INLINE COMMENTS

> kmountpoint.cpp:443
> +            parentPath = splitted.join(QDir::separator());
> +            fileinfo = QFileInfo(parentPath);
> +            if (fileinfo.isSymLink()) {

Why reuse and assign, compared to just `const QFileInfo fileinfo(parentPath)`?

(Same for parentPath -- I prefer C++ over C)

> kmountpoint.cpp:447
> +                // for /dir/link/dir/test will return result for /destLink/dir/test
> +                return findByPath(fileinfo.symLinkTarget() + QDir::separator() + poped.join(QDir::separator()));
> +            }

Wouldn't .mid() be faster than split+join? Just wondering. I see why you need to split, just wondering about join..

> kmountpoint.cpp:449
> +            }
> +            poped.append(splitted.takeLast());
> +        }

Doesn't this reverse the order?

REPOSITORY
  R241 KIO

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

To: meven, #frameworks, ngraham, broulik, dfaure
Cc: 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/20200118/0939b3db/attachment.html>


More information about the Kde-frameworks-devel mailing list