[Differential] [Request, 69 lines] D4628: Add ability to disable saving in `KTextEditor::Document`

Russell Greene noreply at phabricator.kde.org
Thu Feb 16 05:56:57 UTC 2017


russellg created this revision.
russellg set the repository for this revision to R39 KTextEditor.
Restricted Application added subscribers: Frameworks, kwrite-devel.
Restricted Application added a project: Frameworks.

REVISION SUMMARY
  I'm currently writing an application where the user is expected to type some code in, but it isn't then saved to a file, but it is just passed back to the application in memory.
  
  It's misleading to the user for them to press Ctrl+S and then a save dialog comes up--they shouldn't be saving it!
  
  Here's my fix. Any suggestions are welcome.

TEST PLAN
  I added a basic test to the test suite, it's not very good though. I wanted to make sure that the `documentSaveAs` function was failing _before_ I called `setSaveEnabled`, but that would require somehow pressing "cancel" on the file dialog which I do not know how to do, if it's possible at all.

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D4628

AFFECTED FILES
  autotests/src/katedocument_test.cpp
  autotests/src/katedocument_test.h
  src/document/katedocument.cpp
  src/document/katedocument.h
  src/include/ktexteditor/document.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: russellg
Cc: kwrite-devel, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170216/ac6ce503/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list