Revision c2ae1cd...

Go back to digest for 15th June 2014

Other in KDE Base

Vishesh Handa committed changes in [plasma-workspace] runners/services/servicerunner.cpp:

ServicesRunner: Give applications whose name contains the term higher preference

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

File Changes

Modified 1 files
  • runners/services/servicerunner.cpp
1 files changed in total