Bug 472481 - Issue when opening a file from the recent list
Summary: Issue when opening a file from the recent list
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 23.04.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-21 22:21 UTC by popov895
Modified: 2024-12-13 11:00 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description popov895 2023-07-21 22:21:12 UTC
SUMMARY

When I try to open a file from the recent list that doesn't exist, the app creates a new file with the same name instead of warn the user that the file doesn't exist.

STEPS TO REPRODUCE

1. Create a new file 111.txt
2. Open 111.txt in the Kate
3. Close Kate
4. Delete 111.txt
5. Open Kate and try to open 111.txt from the recent list

OBSERVED RESULT

Kate creates a new empty file with the name 111.txt.

EXPECTED RESULT

Kate doesn't create any file, but warns the user that such a file doesn't exist.

SOFTWARE/OS VERSIONS

Operating System: openSUSE Tumbleweed 20230718
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
KDE Gear Version: 23.04.3
Qt Version: 5.15.10
Graphics Platform: X11
Comment 1 Bug Janitor Service 2024-12-12 13:39:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1670
Comment 2 Christoph Cullmann 2024-12-13 11:00:44 UTC
Git commit bf88dc96203adc14fe9f5974bbf61ed83044af9f by Christoph Cullmann, on behalf of ambar chakravartty.
Committed on 13/12/2024 at 11:00.
Pushed by cullmann into branch 'master'.

Error popup when clicking on deleted files in Recent Files menus

The "Recent Files" menus opened a blank file when clicking on a file that had been deleted.

The changes in code display an error popup with the message  "This file does not exist" if such a file entry is clicked in the Recent Files Menu

M  +1    -1    apps/lib/katemainwindow.cpp
M  +16   -0    apps/lib/kateviewmanager.cpp
M  +1    -0    apps/lib/kateviewmanager.h
M  +4    -2    apps/lib/welcomeview/welcomeview.cpp

https://invent.kde.org/utilities/kate/-/commit/bf88dc96203adc14fe9f5974bbf61ed83044af9f