Review Request 112281: Allow setting a custom highligher on the spell check decorator

David Edmundson david at davidedmundson.co.uk
Tue Aug 27 00:20:44 UTC 2013



> On Aug. 26, 2013, 7:08 a.m., Kevin Ottens wrote:
> > tier1/sonnet/src/ui/spellcheckdecorator.h, line 40
> > <http://git.reviewboard.kde.org/r/112281/diff/1/?file=184608#file184608line40>
> >
> >     I would rather have a setter than an extra ctor parameter if possible. Since we already have a getter...

The rationale behind it was that I don't want to create a default Highlighter only to delete it. 
The Highlighter constructor is somewhat expensive as it loads the dictionary.

If we really want a set/get approach, I could do something like KTextEdit currently does where it only creates a default highlighter on demand (i.e in the highlighter() and onContextMenuEvent() methods if one has not currently been set.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112281/#review38580
-----------------------------------------------------------


On Aug. 25, 2013, 11:40 p.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112281/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2013, 11:40 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Description
> -------
> 
> Allow setting a custom highlighter on the spell check decorator
> 
> --
> 
> This is needed in order to use this code from inside KTextEdit which allows setting a custom highlighter. 
> This will also be useful for anyone wanting to subclass Sonnet::Highlighter on a QTextEdit.
> 
> 
> Diffs
> -----
> 
>   tier1/sonnet/src/ui/spellcheckdecorator.h 5ded08d87040d922885e05459e5d33baa5d1a874 
>   tier1/sonnet/src/ui/spellcheckdecorator.cpp 72999662c6478481087e1c2c9b0bac5baeabd8f4 
> 
> Diff: http://git.reviewboard.kde.org/r/112281/diff/
> 
> 
> Testing
> -------
> 
> None - my KF5 setup has no dictionaries installed.
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130827/fafe1f51/attachment.html>


More information about the Kde-frameworks-devel mailing list