D19511: ViewPrivate: Disable read-only mode action when doc is modified

Christoph Cullmann noreply at phabricator.kde.org
Mon Mar 4 18:28:46 GMT 2019


cullmann added a comment.


  Hmm, two things:
  
  1. implementation wise: don't we have a problem here that the connect(document(), &KTextEditor::DocumentPrivate::modifiedChanged, [=] { m_toggleWriteLock->setEnabled(!doc()->isModified()); }); will not be unconnected if the view dies and we call on an invalid pointer?
  
  2. logic wise: why not allow people to set read only if it was modified? That avoids that you type something into the document by accident.

REPOSITORY
  R39 KTextEditor

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

To: loh.tar, #ktexteditor
Cc: cullmann, kwrite-devel, kde-frameworks-devel, #ktexteditor, domson, michaelh, ngraham, bruns, demsking, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190304/12eff4aa/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list