[Differential] [Updated] D4628: Add ability to disable saving in `KTextEditor::Document`

Dominik Haumann noreply at phabricator.kde.org
Thu Feb 16 20:22:56 UTC 2017


dhaumann added a comment.


  I think we don't need this patch: The solution is to disable the save and saveAs actions: Iterate over the document's KActionCollection to find the correct actions (see katepart5ui.rc), and then disable / remove them. This is also how KDevelop and Kate once did this, iirc.
  See:
  
  - https://api.kde.org/frameworks/kxmlgui/html/classKActionCollection.html#ab8bacff58a3d7d803683a30cb24fbd43
  - https://api.kde.org/frameworks/kxmlgui/html/classKActionCollection.html#aacc3361f625d712f340f6302735dccff
  
  If this does not work for you, please extend the ConfigInterface that the Document inherits. Does that work for you?
  
  Please discard this patch for now. Feel free to make a new patch with the ConfigInterface in case the proposed solution with the action collection does not work.

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

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

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


More information about the Kde-frameworks-devel mailing list