When a file being edited is changed on-disk by another program, a popup is displayed with the following options: - Save File As - Ignore Changes - Close - Cancel The third option should close the file in question. This works in Kate 15.12, but not in KDevelop 4.90.91; instead, the file remains open and the warning icon disappears from the tab. This causes that file to appear as normal in the UI, with no changed-on-disk or unsaved-changes indicator, but 'disappear' on exit unless new changes are made and saved (in which case the file is silently recreated). Reproducible: Always Steps to Reproduce: 1. Create and save a file. 2. Using another program, delete or move that file on-disk while keeping it open in KDevelop. 3. When returning to the file in KDevelop, select 'Close'. Actual Results: - The file remains open in apparently-normal state. - The file remains deleted on disk if no further changes are made. - The fIle is silently recreated if new changes are made and saved. Expected Results: The file (or the tab showing it) is closed.
Correction: "is changed on-disk" should be "is moved or deleted". Changing it in place leads to a slightly different dialog, which works fine.
This is a KTextEditor bug -> moving
Hm, I missed the "This works in Kate 15.12, but not in KDevelop 4.90.91" part -- not entirely sure if this is KTextEditor bug then. We'll have a look at the issue anyway.
Looked at it with Kevin, KDevPlatform will need to implement some more functions for the KTextEditor::Application interface, e.g. closeDocument
Git commit e2bcd581bb8a9bb0005a9fcdce3167fc6be77e40 by Kevin Funk. Committed on 05/09/2016 at 19:01. Pushed by kfunk into branch '5.0'. Close editor view when asked to We need to mimic the interface of KTextEditor::Application here; closeDocument is called by KTextEditor when trying to close a document which has been deleted before. FIXED-IN: 5.0.1 M +3 -2 shell/documentcontroller.cpp M +1 -1 shell/documentcontroller.h M +7 -0 shell/ktexteditorpluginintegration.cpp M +6 -0 shell/ktexteditorpluginintegration.h http://commits.kde.org/kdevplatform/e2bcd581bb8a9bb0005a9fcdce3167fc6be77e40