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

Reply via email to