If the exec matches then it should be ranked higher. The use case for
this is when trying to launch "pavucontrol". The Generic Name is "Pulse
Audio Volume Control". pavucontrol appears below search results because
it's priority was 0.6 (the lowest) even though its exec matched.
Reviewed By: Aleix Pol
The current order works like this -
* Name contains term - 0.8
* Name starts with term - 0.9
* Generic Name contains term - 0.65
* Generic Name starts with term - 0.7
* Keyword contains name - 0.6
if it is a kde app + 0.09
Previously, it was -
* Name contains term - 0.8
* Name starts with term - 0.9
* Generic Name contains term - 0.7
* Generic Name starts with term - 0.8
* Keyword matches - 0.6
if it is a kde app + 0.1
This meant that if a kde app has a generic name that starts with the
term, it will get a higher priority than if there exists a non kde app
whose name contains the phrase.
Eg - "Marble" has a generic name of "Virtual Desktop" and is a KDE app.
It is ranked higher than "Oracle VirtualBox" when the term is "virtual".
With this patch, name matching always gets a higher relevance.
This patch also changes the priority of matches cause of categories.
They will now ALWAYS come after non category matches. Earlier if a
category matched + if it was a KDE app, its relevant would be 1, which
was would mean it would come after if the name starts with the term,
which is so stupid.
Reviewed By: David Edmundson and Rohan Garg
In commit 983bacb8 (plasma-framework - 2011-05-20) the mimeDataForMatch
signature was changed. It now accepts a reference instead of a pointer,
but the runners don't seem to have been updated.
This is why we need proper automated tests.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo kde-workspace, frameworks branch, at commit
049113e719dd2fc4446d054fa1a3aada330094f0