Bug 486588

Summary: Upon session switch cancel for unsaved changes dialog for unsaved file does nothing
Product: [Applications] kate Reporter: uzivatel919
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph, justin
Priority: NOR    
Version First Reported In: 23.08.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: 2 dialog for usaved changes in saved file
2 dialogs for unsaved file

Description uzivatel919 2024-05-04 19:29:25 UTC
SUMMARY
When there is unsaved file w or w/o changes upon session switch, dialog's Cancel button does nothing. Session is switched.

STEPS TO REPRODUCE
1. Open session.
2. Add new file, add changes to it for clarity, do not save.
3. Switch to another session (Session/All Sessions)

OBSERVED RESULT
Session is switched.

EXPECTED RESULT
Switching process is halted.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240403
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.113.0
Qt Version: 5.15.11
Kernel Version: 6.8.2-1-default (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Does not apply to already saved file with changes. Maybe because there are 2 same consequent dialogs upon this case.
Comment 1 Justin Zobel 2024-05-05 03:46:04 UTC
I can't confirm this on latest builds, I get a prompt asking me to save my changes. Can you please try a later version, either from your OS or via Flatpak?
Comment 2 uzivatel919 2024-05-06 15:42:32 UTC
- I did not tell there is no dialog but that Cancel button does not prevent session switch.
- Nonetheless, I updated to version 23.08.4 and observed behavior:
   - Saved file w changes: 2 dialogs with promt showed
   - Unsaved file: 2 dialogs showed
Comment 3 uzivatel919 2024-05-06 15:43:35 UTC
Created attachment 169242 [details]
2 dialog for usaved changes in saved file
Comment 4 uzivatel919 2024-05-06 15:44:19 UTC
Created attachment 169243 [details]
2 dialogs for unsaved file
Comment 5 Christoph Cullmann 2024-10-26 17:11:52 UTC
Fixed in master with

https://invent.kde.org/utilities/kate/-/commit/75f83c07d5681d9254cc250701be76be2f4c09ca