Bug 502247

Summary: Leaving Behavior config page without changing any options alters sort mode
Product: [Plasma] plasmashell Reporter: Nate Graham <nate>
Component: Task Manager and Icons-Only Task Manager widgetsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kdedev, qydwhotmail
Priority: NOR Keywords: regression
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Nate Graham 2025-03-31 16:44:18 UTC
Today's git master.


STEPS TO REPRODUCE
1. Right-click on desktop > enter Edit Mode
2. Add Panel > Default panel
3. Edit from Edit Mode
4. Try to re-arrange Task Manager icons -> succeeds
5. Right-click on Task Manager widget > Configure
6. Go to Behavior page
7. Don't change anything, just click OK to close it
8. Try to re-arrange Task Manager icons -> fails!

OBSERVED RESULT
Leaving the behavior page without making changes actually changes the sort mode

EXPECTED RESULT
Leaving the Behavior page without making changes does not change the sort mode
Comment 1 TraceyC 2025-03-31 16:45:39 UTC
I don't see the icons rearrange themselves, but I can reproduce that they can't be dragged and dropped after exiting the task manager settings
I had moved the Firefox icon before going into settings, and it stayed put, as did the others.
Comment 2 Bug Janitor Service 2025-04-01 21:46:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2911
Comment 3 cwo 2025-04-02 06:48:19 UTC
Git commit 401cfa402ac3fea6410f25c935a4e88f1eca9d4f by Christoph Wolk.
Committed on 02/04/2025 at 06:38.
Pushed by cwo into branch 'master'.

applets/taskmanager: fix sorting configuration combobox

The sorting combobox uses a model as the index of the entry does
not match the enum values used in the backend (one of the entries is
currently not exposed). In that case, however, the value cannot be set
through a property alias - currentValue only works for reading values,
not for setting them.

Instead, use a real property and read/set it as in the qml documentation
on comboboxes with data models.

M  +3    -1    applets/taskmanager/package/contents/ui/ConfigBehavior.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/401cfa402ac3fea6410f25c935a4e88f1eca9d4f