Skip to content

applets/kickoff: Less noisy errors

ivan tkachenko requested to merge work/ratijas/Kiek-in-de-Kök-off into master

Drop QML import versions

They are deprecated and unhelpful.

This is an automated change using the following regexp:
Search: (import \S+) \d\S*( as \S*)?
Replace: \1\2

Remove unused imports

In Qt 6 importing QtQml is no longer required to fix the Binding enum. And QtQuick.Window is now nothing but an alias to QtQuick.

Replace duck-typing with type check

Fixes the following errors in SectionView (the one with a grid of letters which shows up when you click on a section header in All Applications view):

file:///usr/local/kde/usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/KickoffGridView.qml:127:13: Unable to assign [undefined] to bool

And while at it, replace custom property isPressed with a standard and writable AbstractButton::down which exists exactly for this purpose.

Factor out pushing section view onto a stack view

As you can see, the two identical implementations already started drifting out of sync for no good reason.

Fix another case of duck-typing

More const variables

Avoid a dubious binding loop

Something's wrong with either GridView of its parent-parent EmptyPage control: it receives several superfluous size changes.

Port to pragma ComponentBehavior: Bound

Luckily, the most data-heavy base types have already used required properties, so it turned out not that big of a porting.

Fix refreshing of the avatar icon

Concatenation of QUrl + string + int is problematic, especially considering the implicit resolving of strings when assigned to URL properties like here: an empty faceIconUrl would result in the qrc:/[...]/Avatar.qml?timestamp=12345 being assigned as the icon URL.

The faceIconUrl property emits two signals in a row during which it changes to an empty URL and probably back to the same static .icon file path as before, so all we need to do is to make sure that QtQuick.Image wouldn't cache it. Thus, the timestamp trick should be irrelevant.


See also:

CC @broulik @ndavis @akselmo

Merge request reports