| Summary: | Untitled documents disappear from the working set when the user starts or stops debugging | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Igor Kushnir <igorkuo> |
| Component: | UI: general | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | chrisito |
| Priority: | NOR | ||
| Version First Reported In: | 5.14.240480 | ||
| Target Milestone: | --- | ||
| Platform: | Manjaro | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/kdevelop/kdevelop/-/commit/9cc5682da37101b62eabd56437fd901c554b202c | Version Fixed/Implemented In: | 5.15.240800 |
| Sentry Crash Report: | |||
|
Description
Igor Kushnir
2024-05-07 17:51:17 UTC
This bug is sort of reverse of Bug 409858 fixed in the mentioned merge request. Documents with a non-Untitled URL that don't have corresponding files on disk disappear when starting/stopping debugging too: 1. A nonexistent file opened by double-clicking a row in Breakpoints tool view. 2. A file that was opened in KDevelop editor, then deleted from disk externally. (In reply to Igor Kushnir from comment #1) > This bug is sort of reverse of Bug 409858 fixed in the mentioned merge request. A simple fix that does not reopen Bug 409858 might work: skip opening nonexistent files only on KDevelop start, not when that function is called during a switch to a different area. Hopefully those nonexistent documents would be (re)opened correctly then. A possibly relevant merge request was started @ https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/559 (In reply to Igor Kushnir from comment #2) > (In reply to Igor Kushnir from comment #1) > > This bug is sort of reverse of Bug 409858 fixed in the mentioned merge request. > A simple fix that does not reopen Bug 409858 might work: skip opening > nonexistent files only on KDevelop start, not when that function is called > during a switch to a different area. Hopefully those nonexistent documents > would be (re)opened correctly then. I did something similar: Check if the document controller might actually find something with the temporary untitled name. If it does, take that document, if not, skip it. At startup it will not find the document. When switching between areas, it actually does. Git commit 9cc5682da37101b62eabd56437fd901c554b202c by Christoph Roick. Committed on 30/05/2024 at 21:47. Pushed by croick into branch 'master'. Keep unsaved documents open when switching areas The document controller can find unsaved files by specifying the "untitled" document name as long as the controller exists. Show the document if it is found. FIXED-IN: 5.15.240800 M +8 -0 kdevplatform/shell/tests/test_workingsets.cpp M +8 -2 kdevplatform/shell/workingsets/workingset.cpp https://invent.kde.org/kdevelop/kdevelop/-/commit/9cc5682da37101b62eabd56437fd901c554b202c |