For KCMs we get a relative entryPath() for our KService resulting in an invalid URL being created.
CCBUG: 397070
Differential Revision: https://phabricator.kde.org/D14546
This codepath is hit when the search query is very short. Fixes "D" and "d" finding different, sometimes no, results.
BUG: 394202
FIXED-IN: 5.12.6
Differential Revision: https://phabricator.kde.org/D12927
Summary:
Composing CJK character requires a lot more key comparing to latin
characters. The raw length check does not make much sense for query string
in CJK characters. Here we use a simple algorithm to query the character
script property in unicode. If they are belong to CJK, use length 2 instead
of 1 for the character.
Test Plan:
Search "系" (normally requires three key press "x + i + 1" under pinyin) under
zh_CN in krunner and get some result instead of nothing.
Reviewers: hein, broulik
Reviewed By: hein
Subscribers: cfeck, ihipop, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8771
Match applications in krunner using subsequences instead of substrings.
This allows matching applications using parts of its name, instead of
having to type its full name.
This is also an attempt to implement bug #262837 (Applications runner -
match subsequence instead of substring)
Differential Revision: https://phabricator.kde.org/D5870
Summary:
after the recent set of changes to disqualification we ended up with a bit
too lax disqualification. if we saw the exec OR the storageid we'd
hence forth disqualify a service with either of them being equal.
in case of system settings this causes a match problem. systemsettings
has two desktop files one !KDE and one OnlyKDE they are however exactly
the same except for a different name and storageid. as a result if the !KDE
one is encountered first it will be disqualified on account of
noDisplay=true and marked as seen. when the OnlyKDE systemsettings is then
iterated it will already have the Exec entry in the seen list and be
disqualified on account of that.
to prevent this type of confusion make it a requirement to match both
storageid AND exec before disqualifying.
it may actually be suitable to drop the exec altogether. say I copy firefox
into the user local applications dir and set it NoDisplay=true but change
the exec. this would still lead to the system-wide firefox being found as
it is not getting disqualified. long story short: maybe we should
disqualify services solely on the storageid?
Test Plan:
- new autotest case
- fails without changes
- passes with changes
Reviewers: broulik
Reviewed By: broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4415
disqualify() checks whether the service ought to be disqualified (i.e.
not processed) and then marks it seen. this allows us to boilerplate
call disqualify(service) whenever iterating services to decide whether
the service in question should be skipped.
also means we don't have to call noDisplay once a service is disqualified
reviewed by kbroulik on irc
Summary:
KService::noDisplay() includes qualification for
- NoDisplay entry itself
- OnlyShowIn and NotShowIn
- X-KDE-OnlyShowOnQtPlatforms
- authorization WRT KCMs
as such checking nodisplay is good enough to disqualify services in all
relevant scenarios
Test Plan: - read the code of noDisplay()
Reviewers: broulik
Reviewed By: broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3705
Summary:
refactor and qcdebug
::match was a super long spagetthi with multiple sub-matches.
This was supposedly primarily because it needed to be stateful across all sub-matches. To deal with this there's a new class which is taking care of the stateful service finding, this class is comprised of multiple matching functions that contribute to the full match set.
Good enough readability for now. Classes for this would be nicer though.
Also add qcdebug for this runner so we can get a better idea of why results are the way they are. Defaults to warning so it's silent by default.
Test Plan:
Careful refactoring so hopefully no problems.
- still matches binary names as best match
- still matches comments
- still matches generic names
- still matches names
Reviewers: broulik
Reviewed By: broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3687
Kickoff traditionally prefers showing the application comment (ie. "File Manager", "Web Browser", etc)
over the actual application name. This allows to find applications this way.
Differential Revision: https://phabricator.kde.org/D2204
"new KRun" is only meant to run absolute file paths and so breaks when we get a
service with relative entryPath() like when finding a KCModule.
The tempFile argument causes this call to be asynchronous as to not block the UI
It blocks KRunner while the application is loading and in some cases
(like Kate's session selection dialog) might never return.
BUG: 361917
FIXED-IN: 5.7.0
Differential Revision: https://phabricator.kde.org/D1769
Tell the KActivities daemon about launched applications so they show up in Kickoff.
BUG: 182887
FIXED-IN: 5.7.0
Differential Revision: https://phabricator.kde.org/D1662
This makes the service runner find also additional actions provided by applications,
eg. "big picture" now finds Steam's "Big Picture" mode which isn't a separate application
service but instead an action on the main application.
Differential Revision: https://phabricator.kde.org/D1504
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