Summary: | Create new file when trying to open a nonexistent file | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Alexander Potashev <aspotashev> |
Component: | All editors | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | aleixpol, lycantrophe |
Priority: | NOR | Keywords: | junior-jobs |
Version: | 4.4.1 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Patch |
Description
Alexander Potashev
2013-07-22 11:40:04 UTC
One should have a look at the Kate editor, then... How is it implemented there? Patches welcome. I've investigated this a bit. The code that manages this is chooseDocument() in kdevplatform/shell/documentcontroller.cpp Now, it calls openDocumentInternal which is supposed to handle it. It fails the check KIO::NetAccess::exists which makes it return without creating a document. I'm not sure of this is correct behaviour on exists' part, but assuming it is it is the following code that must be adjusted. The method that is used in the File->New file dialogue is a part of MainwinPrivate, and therefore not accessible. Someone who knows the details on how KDevelop handles documents should have a look at this. Created attachment 81699 [details]
Patch
Removes the file-exists check.
I have submitted a patch that should solve this. I haven't found any regressions that should follow from this. Here is the review: https://git.reviewboard.kde.org/r/112078/ https://git.reviewboard.kde.org/r/112078/ I updated the patch (with comments) to the reviewboard after irc discussions with Sven. Newer versions of Kate will create a message saying that a file has been created when opening a non-existent file. This was already fixed, wasn't it? It was, so this ticket can be closed. |