D28968: [KRichTextEdit] Make sure headings don't mess with undo stack
Igor Poboiko
noreply at phabricator.kde.org
Sun Apr 19 11:23:57 BST 2020
poboiko added inline comments.
INLINE COMMENTS
> dfaure wrote in krichtextedit.cpp:572
> Where is the corresponding beginEditBlock()?
`joinPreviousEditBlock` in a way acts as `beginEditBlock` (see https://doc.qt.io/qt-5/qtextcursor.html#joinPreviousEditBlock).
The intent here was following: if user pressed `Return`, a new line (empty `QTextBlock`) is inserted somewhere inside `QTextEdit::keyPressEvent`. I want to also change the cursor style, and I want this action to be treated together with this `QTextBlock` insertion as a single action in undo stack. That's what `joinPreviousEditBlock / endEditBlock` combo does (semantically, this "previous edit block" is `QTextBlock` insertion inside `QTextEdit::keyPressEvent`)
REPOSITORY
R310 KTextWidgets
REVISION DETAIL
https://phabricator.kde.org/D28968
To: poboiko, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200419/91f56a72/attachment.html>
More information about the Kde-frameworks-devel
mailing list