D29506: rejigger lookup of services by exec
Harald Sitter
noreply at phabricator.kde.org
Thu May 7 13:43:02 BST 2020
sitter created this revision.
sitter added a reviewer: broulik.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
sitter requested review of this revision.
REVISION SUMMARY
previously we'd simply query for an Exec that contains the primary query
word. that is actually fairly unreliable because that will also match
on env vars, arguments and the like which then has opportunity to produce
false positives.
notably examples is the konversation flatpak which matches 'ding' because
it has a --forwarding argument in the Exec line and then even gets a
relevance bump because it is a KDE application, so suddenly it outscores
the actual ding application.
to deal with this some rejiggering is necessary. we now query for potential
Exec matches in its own query so we can tell which services are general
matches and which are Exec matches. we'll then reduce the exec matches
down to the ones that aren't already service matches AND where the actual
executable name contains the primary query.
TEST PLAN
test passes, konversation is no longer reported as match for 'ding' in kickoff
REPOSITORY
R120 Plasma Workspace
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D29506
AFFECTED FILES
runners/services/autotests/fixtures/ding.desktop
runners/services/autotests/fixtures/flatpak_org.kde.konversation.desktop
runners/services/autotests/servicerunnertest.cpp
runners/services/servicerunner.cpp
To: sitter, broulik
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200507/0539a7e7/attachment.htm>
More information about the Plasma-devel
mailing list