We want to check the user-visible name, not the name of the file on disk.
In case we type "di", results like "Discord" or "Discover" are expected. With the old
logic however, we would reject discover, because the desktop file is called "org.kde.discover".
BUG: 443866
By setting the deprecation version for KRunner to 5.91,
the negated deprecation wrapper will evaulate to true and
we get compatibility typedefs.
This way we do not need to add the typedefs manually or
add `using namespace Plasma` to the plugins.
Task: https://phabricator.kde.org/T15140
Add explicit find_package() and #include's that are required and were
pulled in by KDELibs4Support.
krdb: remove one redundant #include, KColorUtils
kcm_fonts: send dbus message directly to org.kde.KDEPlatformTheme to
'refreshFonts'
kcm_style:
- use KToolBar::emitToolbarStyleChanged() to notify of toolbar style changes
For the rest use the notifyKcmChange() private method to send the dbus
signal.
[1] https://invent.kde.org/frameworks/kdelibs4support/-/blob/master/src/kdeui/kglobalsettings.cpp#L860
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
this frees the internal per-thread inotify instance used to watch
database changes meaning runner applications no longer claim N inotify
instances (N=size of threadweaver pool).
the database is still reloaded by ksyscoca internally if it finds the
backing file has changed.
CCBUG: 423818
kcms are handy but not nearly as handy as an actual application. this is
particular notable with the test case where the user could type 'virt'
but that wouldn't have pushed virtualization software to the top but kcms
since kcms are kde things so they always get a .09 bump to
relevance.
the revised scoring excludes kcms from the bump and further reduces the
relvance by the tiniest fraction. this results in all applications that
match at least as well as the KCM to outscore the KCM
We have to check for the presence of a X-KDE-System-Settings-Parent-Category entry when opening a KCM in systemsettings.
BUG: 423612
(cherry picked from commit 2ebf8ab391)
Summary:
as we can't kill completely kcmshell just yet, hack intothe services runner to
replace on the fly the exec line of the service to systemsettings
BUG: 402790
FIXED-IN: 5.19.0
Test Plan:
search and launch directly for a module, systemsettings is launched wit hthe
proper module loaded
Reviewers: #plasma, ngraham
Reviewed By: ngraham
Subscribers: broulik, ngraham, davidre, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29157
Regression introduced in 6e660cf92d since it's now a URL with a scheme, e.g. "applications".
Service actions cannot be dragged out but that wasn't the case before either I believe.
Differential Revision: https://phabricator.kde.org/D28907
Use ApplicationLauncherJob and CommandLauncherJob.
Also, for services runner pass a KServiceAction to the job so it invokes the appropriate jump list action
Differential Revision: https://phabricator.kde.org/D28347
Summary:
build the runner itself in a static lib we can use for testing and then
link that into a module lib together with the factory entry point to
compose the final lib for installation
means servicesrunner.cpp is now only built once, whereas before it was
built twice through 100% duplicative targets
Test Plan: test still passes, installing and restarting krunner still yields working service searches
Reviewers: broulik, davidedmundson
Reviewed By: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28137
Summary:
- be more consty (and don't risk detatching containers)
- init members
- don't ql1s to qstring
- use auto when newing an object
Test Plan: test passes
Reviewers: broulik
Reviewed By: broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28138
HelperMatch type was used to identify them in run but this also causes them to score way higher than anything else (except ExactMatch).
CCBUG: 418529
Differential Revision: https://phabricator.kde.org/D27886
Summary:
Desktop files such as kde/foo.desktop are identified as kde-foo.desktop
because of the menu spec
```
If the directory contains sub-directories then these sub-directories should be (recursively) scanned as well. The name of the subdirectory should be added as prefix to the desktop-file id together with a dash character ("-")
```
the runner therefore broadly assumed that kde-foo.desktop is always
the desktop file kde/foo.desktop and since kde/ was only used up to KDE3
this assumption formed the basis for sepcial KDE3 compat handling. that is
of course wrong because a service might just as well actually have a
prefix and be actually called kde-foo.desktop rather than
kde/foo.desktop. Specific example: kde-gtk-config.desktop
seeing as this is ancient compatibility code that is actually wrong,
the easiest solution seems to be dropping the code entirely (and thus no
longer assume kde- has some special meaning).
(also I didn't find a way to get the underlying filename of a kservice,
so making the code not wrong seems non-trivial)
CHANGELOG: the GTK+ settings module now correctly appears in krunner and kickoff
BUG: 383287
Test Plan: gtk kcm correctly shows up in both kickoff and krunner searches
Reviewers: broulik
Reviewed By: broulik
Subscribers: GB_2, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19788
Summary: Minor optimisation, should behave identically.
Test Plan:
Ran krunner
Searched for some apps
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19475
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