Bug 416834

Summary: No KCMs will ever prompt to save/discard changes when switching to another KCM using the sidebar
Product: [Applications] systemsettings Reporter: Patrick Silva <bugseforuns>
Component: sidebarviewAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal CC: cyril.rossi, kde, meven29, nate, plasma-bugs, popov895
Priority: NOR    
Version: 5.17.90   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://phabricator.kde.org/D27381
Latest Commit: Version Fixed In: 5.18.1

Description Patrick Silva 2020-01-27 20:19:06 UTC
STEPS TO REPRODUCE
1. set system settings to side bar view
2. select any kcm and change any setting
3. switch to another kcm or go back to the main page 

OBSERVED RESULT
no save/discard prompt, change is lost

EXPECTED RESULT
system settings always shows save/discard ṕrompt when we try to leave a kcm without save a change

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.67.0
Qt Version: 5.13.2
Comment 1 popov895 2020-02-13 19:03:00 UTC
Same on KDE Plasma 5.18.0 stable (Neon 5.18, Frameworks 5.67.0, Applications 19.12.2, Qt 5.13.2)
Comment 2 David Edmundson 2020-02-14 12:18:21 UTC
Git commit 979419d7430de2c32a5a6ebc8376039117778baa by David Edmundson.
Committed on 14/02/2020 at 12:18.
Pushed by davidedmundson into branch 'Plasma/5.18'.

[sidebar] Resolve changes in module before switching

Summary:
After some refactoring we close the module before checking if there are
unsaved changes. We then try to resolve changes on the new KCM that
we've just opened, which never has changes.
Fixed-in: 5.18.1

Test Plan:
Opened colours in systemsettings
changed it
switched to another kcm

Did the same from within a search

opened kinfocenter
no prompts

Reviewers: #plasma, bport, ngraham

Reviewed By: bport, ngraham

Subscribers: ngraham, bport, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27381

M  +4    -3    sidebar/SidebarMode.cpp

https://commits.kde.org/systemsettings/979419d7430de2c32a5a6ebc8376039117778baa