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.
- Group Reviewers
- 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.
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