Summary: | Save and restore unsaved files doesn't work when closing app with Ctrl+Q; changes are silently lost | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Grósz Dániel <groszdanielpub> |
Component: | sessions | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | kde, meven29, nate |
Priority: | VHI | ||
Version: | 20.12.1 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/utilities/kate/commit/9f87e0106a912237e586db592f4d6eae396f673d | Version Fixed In: | 21.12.3 |
Sentry Crash Report: |
Description
Grósz Dániel
2022-01-27 08:34:53 UTC
I reported this 10 months ago in https://invent.kde.org/utilities/kate/-/merge_requests/228#note_198079 and can confirm that the issue is still present. I can reproduce it if I quit Kate using Quit or Ctrl+Q shortcut but not when using Alt+F4. Am I the only one in this situation ? (In reply to Méven Car from comment #2) > I can reproduce it if I quit Kate using Quit or Ctrl+Q shortcut but not when > using Alt+F4. > Am I the only one in this situation ? This indeed seems to be the case. If I make some changes, then exit with Alt+F4 (or closing the window with the mouse), then I restart Kate, and quit with Ctrl+Q, then even the changes made before quitting with Alt+F4 are lost. That probably explains why others weren't able to reproduce it. I always quit apps with Ctrl+Q and never use Alt+F4. Curious that these use different codepaths. > Curious that these use different codepaths.
One is explicitly quitting, the other is closing the window where Qt goes "alrght, all my windows are closed, better quit now".
I suppose file_quit action is explicitly wired to save the session and then calls qApp->quit, whereas Qt just calls quits internally, effectively bypassing the save.
(In reply to Kai Uwe Broulik from comment #5) > > Curious that these use different codepaths. > > One is explicitly quitting, the other is closing the window where Qt goes > "alrght, all my windows are closed, better quit now". > > I suppose file_quit action is explicitly wired to save the session and then > calls qApp->quit, whereas Qt just calls quits internally, effectively > bypassing the save. But it's the other way around: unsaved changes are retained when quitting by closing the window (Alt+F4), and doesn't work when quitting with File/Quit (Ctrl+Q). Git commit 0319a51438be5170f75c99b8ad72de7a1354c585 by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 08/02/2022 at 16:35. Pushed by cullmann into branch 'master'. Fix stashing not working when Kate is quit using Ctrl+Q M +1 -0 kate/kateapp.cpp https://invent.kde.org/utilities/kate/commit/0319a51438be5170f75c99b8ad72de7a1354c585 Git commit 9f87e0106a912237e586db592f4d6eae396f673d by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 08/02/2022 at 16:43. Pushed by cullmann into branch 'release/21.12'. Fix stashing not working when Kate is quit using Ctrl+Q (cherry picked from commit 0319a51438be5170f75c99b8ad72de7a1354c585) M +1 -0 kate/kateapp.cpp https://invent.kde.org/utilities/kate/commit/9f87e0106a912237e586db592f4d6eae396f673d |