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
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