Port to KF5::SyntaxHighlighting
ClosedPublic

Authored by vkrause on Sep 3 2017, 10:13 AM.

Details

Summary

This gives us a generic syntax highlighter with spell checking, using the
spell checking areas from the syntax definition files (which are more
precise than the previous line-based approach). The implementation is a
bit messy unfortunately since neither QSyntaxHighlighter nor QTextBlock
are made for this kind of highlighter composition.

Diff Detail

Repository
R86 PIM: Text Editor
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
vkrause created this revision.Sep 3 2017, 10:13 AM
Restricted Application added a project: KDE PIM. · View Herald TranscriptSep 3 2017, 10:13 AM
vkrause updated this revision to Diff 19126.Sep 3 2017, 11:23 AM

remove some now unused files

mlaurent requested changes to this revision.Sep 3 2017, 12:14 PM
mlaurent added a subscriber: mlaurent.
mlaurent added inline comments.
src/texteditor/plaintexteditor/plaintextsyntaxspellcheckinghighlighter.cpp
109 ↗(On Diff #19126)

coding style "definition &def"

156 ↗(On Diff #19126)

use qAsConst(d->spellCheckRanges) to be sure

src/texteditor/plaintexteditor/plaintextsyntaxspellcheckinghighlighter.h
44 ↗(On Diff #19126)

Definition &def (coding style)

This revision now requires changes to proceed.Sep 3 2017, 12:14 PM
vkrause added inline comments.Sep 3 2017, 12:40 PM
src/texteditor/plaintexteditor/plaintextsyntaxspellcheckinghighlighter.cpp
156 ↗(On Diff #19126)

It's a std::vector, so it can never detach.

vkrause updated this revision to Diff 19131.Sep 3 2017, 12:43 PM
vkrause edited edge metadata.
vkrause marked 2 inline comments as done.

coding style fixes

mlaurent accepted this revision.Sep 3 2017, 1:22 PM
mlaurent added inline comments.
src/texteditor/plaintexteditor/plaintextsyntaxspellcheckinghighlighter.cpp
156 ↗(On Diff #19126)

ok cool

This revision is now accepted and ready to land.Sep 3 2017, 1:22 PM
This revision was automatically updated to reflect the committed changes.