<table><tr><td style="">dhaumann added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4628" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>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.<br />
See:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://api.kde.org/frameworks/kxmlgui/html/classKActionCollection.html#ab8bacff58a3d7d803683a30cb24fbd43" class="remarkup-link" target="_blank" rel="noreferrer">https://api.kde.org/frameworks/kxmlgui/html/classKActionCollection.html#ab8bacff58a3d7d803683a30cb24fbd43</a></li>
<li class="remarkup-list-item"><a href="https://api.kde.org/frameworks/kxmlgui/html/classKActionCollection.html#aacc3361f625d712f340f6302735dccff" class="remarkup-link" target="_blank" rel="noreferrer">https://api.kde.org/frameworks/kxmlgui/html/classKActionCollection.html#aacc3361f625d712f340f6302735dccff</a></li>
</ul>

<p>If this does not work for you, please extend the ConfigInterface that the Document inherits. Does that work for you?</p>

<p>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.</p></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4628" rel="noreferrer">https://phabricator.kde.org/D4628</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>russellg, KTextEditor, cullmann, dhaumann<br /><strong>Cc: </strong>kwrite-devel, Frameworks<br /></div>