I just found that QUrl::fromLocalFile() actually calls QFileInfo::exists on the URL which is not something you want to be doing constantly and especially not for remote locations.
Details
Details
- Reviewers
apol - Group Reviewers
Plasma - Commits
- R120:d38d7df3e170: Replace QUrl::fromUserInput by lighter heuristic
- No longer have plasmashell creeping to a halt when copying stuff from my phone (using sshfs mounted by kdeconnect, ie a "local" path but actually remote) to my PC
This code is really just trying to guess whether the descriptions of the job have any sort of path / filename in it, so replace it by a lighter guessing logic.
Diff Detail
Diff Detail
- Repository
- R120 Plasma Workspace
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
https://doc.qt.io/qt-5/qurl.html#UrlFormattingOption-enum
How about using QUrl::toDisplayString(QUrl::PreferLocalFile)?
Comment Actions
That won't make a difference as it always creates a QFileInfo: https://code.woboq.org/qt5/qtbase/src/corelib/io/qurl.cpp.html#_ZN4QUrl13fromUserInputERK7QStringS2_6QFlagsINS_25UserInputResolutionOptionEE