D21164: Replace QUrl::fromUserInput by lighter heuristic
Kai Uwe Broulik
noreply at phabricator.kde.org
Sun May 12 18:53:34 BST 2019
broulik created this revision.
broulik added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
broulik requested review of this revision.
REVISION SUMMARY
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.
The code is really just trying to figure out a URL from the source or destination labels of the job which are usually either a full URL or just a local path. If it's not, then it's probably not very interesting to us anyway.
TEST PLAN
- 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.
REPOSITORY
R120 Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D21164
AFFECTED FILES
libnotificationmanager/job_p.cpp
libnotificationmanager/job_p.h
To: broulik, #plasma
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190512/99c8edaa/attachment.html>
More information about the Plasma-devel
mailing list