Bug 488292 - Settings in the ksmserver KCM are not initialized to their actual values when returning to it from another KCM
Summary: Settings in the ksmserver KCM are not initialized to their actual values when...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_smserver (show other bugs)
Version: 6.1.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 488523 490918 498250 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-10 09:42 UTC by Paul Worrall
Modified: 2025-01-24 23:08 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Worrall 2024-06-10 09:42:11 UTC
1. Launch "System Settings" and navigate to Session => Desktop Session
2. Navigate to a different KCM (e.g. Locations) and then back to Desktop Session

OBSERVED RESULT
KCM is not initialised with the current settings

EXPECTED RESULT
KCM shows current settings as it did when first displaying it in step 1
Comment 1 Nate Graham 2024-06-10 16:59:07 UTC
Can reproduce.
Comment 2 Nate Graham 2024-06-17 17:33:03 UTC
*** Bug 488523 has been marked as a duplicate of this bug. ***
Comment 3 duha.bugs 2024-07-28 19:34:05 UTC
*** Bug 490918 has been marked as a duplicate of this bug. ***
Comment 4 duha.bugs 2025-01-05 17:51:44 UTC
*** Bug 498250 has been marked as a duplicate of this bug. ***
Comment 5 Bug Janitor Service 2025-01-22 11:07:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2736
Comment 6 David Edmundson 2025-01-23 11:22:18 UTC
Git commit 5d04608fefeaebeeed590bf1e3576428a141adac by David Edmundson.
Committed on 22/01/2025 at 15:30.
Pushed by davidedmundson into branch 'master'.

kcms/ksmserver: Fix settings object lifetime management

Registering a QML singleton with an object with a small lifespan than
the engine is wrong.

This will assert (or at best be broken) when the KCM is opened, closed
and reopened.

This is in line with other KCMs.
Related: bug 487028

M  +6    -3    kcms/ksmserver/kcmsmserver.cpp
M  +6    -1    kcms/ksmserver/kcmsmserver.h
M  +15   -16   kcms/ksmserver/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/5d04608fefeaebeeed590bf1e3576428a141adac
Comment 7 Fushan Wen 2025-01-24 09:23:17 UTC
Git commit 163248cf719ef3d91afa7723c4bb59a9251c36f0 by Fushan Wen, on behalf of David Edmundson.
Committed on 24/01/2025 at 09:07.
Pushed by fusionfuture into branch 'Plasma/6.3'.

kcms/ksmserver: Fix settings object lifetime management

Registering a QML singleton with an object with a small lifespan than
the engine is wrong.

This will assert (or at best be broken) when the KCM is opened, closed
and reopened.

This is in line with other KCMs.
Related: bug 487028


(cherry picked from commit 5d04608fefeaebeeed590bf1e3576428a141adac)

Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>

M  +6    -3    kcms/ksmserver/kcmsmserver.cpp
M  +6    -1    kcms/ksmserver/kcmsmserver.h
M  +15   -16   kcms/ksmserver/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/163248cf719ef3d91afa7723c4bb59a9251c36f0