Add the possibility to have a keyboard shortcut to create a file
ClosedPublic

Authored by thsurrel on Oct 24 2018, 7:59 PM.

Details

Summary

It is already possible to create a directory with a keyboard shortcut (F10 in
Dolphin). This patch adds the same possibility for creating a file.
The file template used will be the first one encountered in the list, so it should
be a text file by default, or a user defined one if any.

Diff Detail

Repository
R241 KIO
Branch
newfileshortcut (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4828
Build 4846: arc lint + arc unit
thsurrel created this revision.Oct 24 2018, 7:59 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptOct 24 2018, 7:59 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
thsurrel requested review of this revision.Oct 24 2018, 7:59 PM
elvisangelaccio added inline comments.
src/filewidgets/knewfilemenu.cpp
755

!m_firstFileEntry

1263–1299

Can we try to not duplicate this code? We should create this new createFile() function such that we can also call it from executeRealFileOrDir()

src/filewidgets/knewfilemenu.h
162

Missing @since

thsurrel updated this revision to Diff 44202.Oct 25 2018, 8:24 AM

Fixes as per elvisangelaccio
Thank you very much for the review!

thsurrel marked 3 inline comments as done.Oct 25 2018, 8:24 AM

+1, looks good to me now.

elvisangelaccio accepted this revision.Nov 25 2018, 10:25 AM
This revision is now accepted and ready to land.Nov 25 2018, 10:25 AM
This revision was automatically updated to reflect the committed changes.