If folders are marked as executable the runner will skip them
but we only want to skip files, because they are handled by
the shellrunner.
BUG: 432653
FIXED-IN: 5.21
This reverts commit 9f2abd0a54.
Scores are adjusted by launch count, so pulling more matches into a
context increases the chance of one of them outscoring the other even
though they have nothing to do with it.
Notable example:
Flatpaks have extremely long Exec lines meaning they match just about
any subsequence match once we've reached 3 query characters.
So then a konversation flatpak matches the query 'tel' same as telegram.
Now if you are more into IRC than into telegram you may have a higher
launch count applying to konversation and all of a sudden the
objectively better match for the query is no longer at the top.
In lieu of a way to prevent this from happening with krunner 5.78 we'll
need to undo the subsequencing for now.
For future reference: Kai and I believe Exec and Comment shouldn't be
subsequence matched at all because Exec just makes no sense to begin
with and Comment can be so very long so it will suffer the same problem
as outlined. The more text there is the higher the chance of it matching
the subsequence simply having having all the characters appear anywhere.
Further future reference: subseq needs a test case added to the unit
test if it makes a return!
BUG: 431609
BUG: 432339
CCBUG: 262837
FIXED-IN: 5.21.0
- In case our query starts with 0x123abc we do not call
the `userFriendlyMultiplication` method which replaces the
x sign with the multiplication operator.
We can be sure that the user wants to parse a hex
value. Also the `=` is not mandatory anymore.
- The hex=mydecimalnumber functionality was broken.
The conversion of the hex value is only done inside of the
if statement and before the values will be the same, unless we do some math operation.
Test Plan:
`=0xf` returns 15
`0xf` return 15
`7x7` returns 49
`hex=15` returns 0xF
`hex=14+1` returns 0xF
BUG: 431362
FIXED-IN: 5.21
Before the variables would get expanded later and consequently
go through another code path than file locations. This leads to the
text being differently displayed and users getting confused.
Also this allows us to check if the file actually exists.
BUG: 358221
FIXED-IN: 5.21
- Do not use deprecated RunnerContext::type()
- Write the url always in the data, this way we don't
need to do all the parsing twice.
- The concept of the case insensitive search does not make
sense in this runner. If the user want to have case insensitive
file search the baloo/recent docs/places runners should be used.
- Do not show a match when we are sure the file does not exist. This would
only show a KIO error message when launching it, consequently there is
no point in showing the message in the first place.
- Support partial matches
- Allow both translated and non-translated trigger words
- Avoid duplicating the translated strings. This can become useful in
case we also want to add the non-translated trigger words to the
syntaxes (once they get displayed somewhere ;))
- Get rid of QRegExp usage
FEATURE: 428193
FEATURE: 428194
FIXED-IN: 5.21
KProtocolInfo handles only protocols KIO knows but apps can also register to be
a URL scheme handler independently of this.
This patch makes the location runner also query for the preferred URL scheme handler
when no known protocol is found. It also prefers the scheme handler over the helper
protocol since a service has a name.
While at it, also format the protocol "exec" using DesktopExecParser to avoid
showing placeholders like '%u' to the user. Also use PreferLocalFile for "go to".
BUG: 416257
We do this sometimes, but not consistenly.
The benefit is twofold.
First it improves the diff when adding new values since no existing line needs to be touched.
Second it prevents clang-format from collapsing the definition into a single line, which is undesired for large enums.