A few KDE versions ago, the KCM and app results were provided by the same plugin.
To make sure they do not appear very far down the list, the plugin id is inserted right after the services runner.
CCBUG: 446239
Use icu transliterator to convert i18n'ed name into ascii for initial
character grouping. Since AppsModel does not use group(), just use group
to store this value for convenience.
Relevant qt feature request for having a new mode for section:
https://bugreports.qt.io/browse/QTBUG-91258
Strategy used by this code mainly focused on CJK language.
1. Japanese locale will group all Han script together.
Katakana will be converted to hiragana.
2. Hangul will decompose and use consonant as group name.
3. Han will use icu "Han-Latin" transliteration to convert to pinyin.
BUG: 433297
BUG: 427530
Hunting this one down since mid-March...
In "native" Plasma containments like the panel, desktop, and plasmawindowed, the `LogindSessionBackend` in `libkworkspace` enters the "Ready" state nearly instantly, before any signals can even be attached. In other containments like Latte Dock and plasmoidviewer, however, the initialization takes some time to complete (unsure why). RootModel was not watching or waiting to check what the session backend's state was, resulting in validity checks being done too soon and never checked again.
This allows 3rd parties to provide additional actions in the context
menu of applications in kicker, kickoff,... by supplying suitable
desktopfiles in GENERIC_DATA_LOCATION/plasma/kickeractions similar
to mechanism used for service menues.
Entries for which the actions are displayed can be controlled by
X-KDE-OnlyForAppIds in the [Desktop Entry], for example
X-KDE-OnlyForAppIds=org.kde.kate,org.kde.dolphin
This was requested as a patch for steam, but we've made a generic
solution so that it can be used by everyone.
In the past, application Favorites were stored with their .desktop file path
such as "/usr/share/applications/org.kde.dolphin.desktop". But now those
entries are stored like so: "applications:org.kde.dolphin.desktop".
This commit converts old DB entries to the new style, which solves the issue
of users with old databases being unable to change their Favorite items.
BUG: 385814
FIXED-IN: 5.24.5
When creating a new KService, it will try to read the file as a desktop
file, but if the file is a large non-desktop file, it will hang for a
long time.
Verify the file is a desktop file, and if not, skip creating KService
and run the match directly.
BUG: 442970
FIXED-IN: 5.24.4
BUG: 401579
FIXED-IN: 5.25
Best used in conjunction with with
https://invent.kde.org/frameworks/kio/-/merge_requests/780 which will
allow kicker recentUsageModel not to make any stat call but solely
base its iconName based on passed mimetype, allowing to act as if
KFileItem::SkipMimeTypeFromContent was set.
If we have multiple sources for the application, we end up with multiple entries.
This is not useful in any scenario, because the generated appstream URL
is exactly the same.
Consequently we should return from the function when we created the first action.
BUG: 448564
The triangle mouse blocks events that happen within a given region and
conditions, then replays those events when those conditions get broken.
If we intercept an enter event, we capture that under
m_interceptedHoverItem so that if conditions change we can replay that
hover enter event before we then start sending move events.
Currently we replay that hover event using the current mouse position.
This causes an issue for kickoff that has additional code to look for
actual move events in order to avoid selecting the current item on
scroll. Both codepaths are correct standalone, but together form a bug.
This patch caches the relative position of a HoverEnter event. Should we
replay the enter event, we do so with the position of the enter. We then
can replay a HoverMove to get the up-to-date location.
BUG: 447278
Qt's foreach is deprecated and should be replaced with modern C++
range-for loops. Const qualifiers are added to variable declarations
and wrapper in std::as_const as required to prevent unnecessary
clones/detach.
Qt's foreach is deprecated and should be replaced with modern C++
range-for loops. Const qualifiers are added to variable declarations
and wrapper in std::as_const as required to prevent unnecessary
clones/detach.
And factored out some duplicated code on the way.
Arguably, `found=false; for(list) {if(cond) {found=true; break;}}` is
harder to read than a single `found=array.contains(cond)` expression.
My only regret is that C++ does not provide any `contains()` function /
algorithm, so we are forced to `find_if` an element and compare it with
an iterator's `end()` which would be an utter nonsense in any other
language.
But most importantly, this commit replaces Qt's deprecated foreach with
a standard for-loop.