Bug 462347 - Kate asks me to save an empty Untitled file before closing
Summary: Kate asks me to save an empty Untitled file before closing
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 22.08.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-28 11:12 UTC by jg
Modified: 2023-04-08 10:42 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jg 2022-11-28 11:12:52 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Open Kate. Type 'a'
2. Delete 'a'
3. Click [x]

OBSERVED RESULT
It prompts to save the empty 'Untitled' file.

EXPECTED RESULT
Don't prompt. The file is empty, and was not already saved. If I really wanted to save an empty file, I would click 'Save'

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Thank you for reading this far!
Comment 1 jg 2022-12-15 13:59:24 UTC
Adding a 100 USD bug bounty for a fix for this
Comment 2 Bug Janitor Service 2023-04-05 21:28:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1185
Comment 3 Christoph Cullmann 2023-04-06 18:40:25 UTC
Git commit ec15c64e557b3e7c7629eed60b9f8ba41daf48f3 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 06/04/2023 at 18:27.
Pushed by waqar into branch 'master'.

Fix asking to save untitled empty doc on close

Remove all docs for which queryClose == true

M  +9    -0    apps/lib/katemainwindow.cpp

https://invent.kde.org/utilities/kate/commit/ec15c64e557b3e7c7629eed60b9f8ba41daf48f3
Comment 4 Waqar Ahmed 2023-04-08 10:38:20 UTC
Git commit 99b98212e4d00ce75015e535ea5ea3cc4e227366 by Waqar Ahmed.
Committed on 08/04/2023 at 10:36.
Pushed by waqar into branch 'release/23.04'.

Fix asking to save untitled empty doc on close

Remove all docs for which queryClose == true
(cherry picked from commit ec15c64e557b3e7c7629eed60b9f8ba41daf48f3)

M  +9    -0    apps/lib/katemainwindow.cpp

https://invent.kde.org/utilities/kate/commit/99b98212e4d00ce75015e535ea5ea3cc4e227366
Comment 5 jg 2023-04-08 10:42:02 UTC
(In reply to Waqar Ahmed from comment #4)
> Git commit 99b98212e4d00ce75015e535ea5ea3cc4e227366 by Waqar Ahmed.
> Committed on 08/04/2023 at 10:36.
> Pushed by waqar into branch 'release/23.04'.
> 
> Fix asking to save untitled empty doc on close
> 
> Remove all docs for which queryClose == true
> (cherry picked from commit ec15c64e557b3e7c7629eed60b9f8ba41daf48f3)
> 
> M  +9    -0    apps/lib/katemainwindow.cpp
> 
> https://invent.kde.org/utilities/kate/commit/
> 99b98212e4d00ce75015e535ea5ea3cc4e227366

Fantastic, many thanks Waqar