ba44b69abf added logic to handle apps that
use an absolute path in their .desktop file to define their icon, which
works. However in the process it introduced a subtle bug: if the icon is
not an absolute path and it's just a normal icon name, when
QFileInfo::exists() checks for the existence of that string, it will
treat it as a relative file path and therefore look for it in the
current working directory, which is typically the user's homedir. If it
finds something, it will go down the wrong code path and end up
returning a blank QIcon. This can be verified by adding a folder with
the name of an app icon into ~ and restarting plasmashell; that app in
Kickoff will have a blank icon.
To fix this, the icon loading code now first checks whether the icon
returned by m_service->icon() is actually an absolute path. If not, it
skips the logic to look for it on disk and goes straight to the
codepath that looks for an icon with that name in the icon theme.
To minimize disk reads, it checks for absolute-file-path-ness by
inspecting the string returned by m_service->icon() rather than using
QFileInfo::isAbsolute(), because this is a hot code path and most icons
will not have relative paths, so checking the disk for every one of
them would be a waste of resources.
BUG: 457965
FIXED-IN: 5.24.7
(cherry picked from commit 57d55e386a)
Currently, the progress indicator is normally displayed only if the DPI is a
multiple of 100; at other DPI values it's almost invisible or not visible at
all. This commit fixes that issue.
BUG: 435004
FIXED-IN: 5.24.7
(cherry picked from commit b5f903862e)
Having the right url is needed for drag and drop to work
For the recentdocuments runner we can just take the result
For the services runner the result is of the form "applications:org.kde.foo.desktop", so extract the service name from that
BUG: 456984
It's rare but it can happen that thumbnail generation fails, then there would be
no drag pixmap at all while dragging.
For consistency sync the drag pixmap icon size to the actual icon size shown in the view
(cherry picked from commit a98f783444)
This is a common snippet of code in applets. It prevents applet from
re-expanding again when user clicks on the compact representation when
the applet is already expanded and located on a desktop containment.
See also: 79bcefdd35
FIXED-IN: 5.24.7 5.25.4 5.26
(cherry picked from commit 335ee5baf3)
This one-liner fix is from Aleix Pol, and fixes the following:
- Crashes when deleting panels with Panel Spacer instances on them
(as described in the bug ID named above)
- Potentially endless crash looping when running `plasmashell --replace`
while a Panel Spacer is on at least one panel
Co-authored-by: Aleix Pol <aleixpol@kde.org>
BUG: 450663
FIXED-IN: 5.25.3
(cherry picked from commit 65fe6b864d)
Unfortunately, the list<> basic QML type is too primitive, it does not
even expose any kind of remove() functionality, so the only supported
way is to create a new list and assign it instead.
This fixes the bug when there may appear multiple empty or duplicating
actions in the expanded view due to the fact they they were only added
to but never cleaned up / removed from the list of contextual actions.
BUG: 449778
(cherry picked from commit af98cef3ef)
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
(cherry picked from commit fcbb1de7a8)
Some actions, such as middle click to mute, trigger only on press. Some applets
also need a pressed-click because of some legacy autoclose on focus change
bug.
Unfortunately, QML does not disambiguate the "pressed" property and "pressed(mouse)"
signal with argument, so this has to be done awkwardly through QMetaObject on C++ side.
BUG: 426646
BUG: 452893
FIXED-IN: 5.25.0
(cherry picked from commit f045cf306c)
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
"Tablet Mode" is jargon that can confuse users. In this mode, things
become larger as an optimization for touch usage, but the word "tablet"
could easily refer to a drawing tablet, for which no touch
optimizations make sense.
Let's change the UI text here to call it "Touch Mode" instead.
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.
When an applet is about to be deleted, it will save its config
automatically, but in this case the system tray doesn't need to load the
config again.
BUG: 453726
`void *` casts into anything but `QVariant::value()` (most of the time)
does a metatype check which needs to match.
Also, we need to unwrap the `QPointer`.
BUG: 453301
Currently the large spacing setting for the System Tray is different from the large
spacing setting for Task Manager icons. So when both are set to large (e.g. in Tablet
mode) they look out of sync.