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.
Needs c815c7a9bc
Currently the logic is very fragile and depends on the data being an url.
However the data of the match is an implementation detail and is in case of the KCM matches
a KPluginMetaData instance.
To avoid this issue the first url of the QueryMatch::urls() return value is checked.
This data is intended for mime-type/scheme related operations.
In the future we need an extra url for systemsettings & should consistently use the
urls of the query match. I will work on this before continuing to port the
plasma KCMs from KServiceTypeTrader.
BUG: 442522
This was deprecated, because having string based key-actions values
does not fit the usecases we have.
Consequently we should check if the runner has any QAction children, this
works if the runner created the QActions manually or if the actions
are registered in the abstract runner.
Also we can drop the ugly hack.
PlasmaQuick::Dialog has it's own WindowType which should be set instead,
otherwise once set NET::WindowType gets smashed by consequent
DialogPrivate::applyType() calls
BUG: 378694
This will result in cleaner diffs when a new value is added
and clang-format will not indent them with the opening
brace of the initializer list which makes is slightly easier to read.
Kickoff has a problem that it has a vertical list of things that act on
hover, but the next step involves moving the mouse to the right where
the target could be at any vertical position.
Moving the mouse in the most direct way involves hovering over other
items.
This can be supressed with a timer, but then we are in a trade off of
false positive activation for some and it being slow and annoying.
Neither is great.
This filter determines movement away from a child list view to
navigation within a child list listview based on mouse direction.
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