Review Request 111912: Introduce Sonnet::TextEditInstaller: easily add spellcheck support to a QTextEdit
Kevin Ottens
ervin at kde.org
Tue Aug 13 06:49:47 UTC 2013
> On Aug. 9, 2013, 11:49 a.m., Kevin Ottens wrote:
> > tier1/sonnet/src/ui/highlighter.cpp, line 237
> > <http://git.reviewboard.kde.org/r/111912/diff/4/?file=177521#file177521line237>
> >
> > I still don't see what the changes in this file have to do with the rest of the patch. Could you explain it to me?
> >
> > Beside it looks odd that it turns a singleShot timer into potentially a recurring one (it's not created single shot and the calls to setSingleShot are scattered everywhere, there's a non-null probability of things going sour here).
>
> Aurélien Gâteau wrote:
> This change is here to unbreak the language change: without it, changing languages using the dictionary combo box in the test program does nothing.
>
> Apologies for the fat review, it is actually made of 11 commits. I just pushed them here: http://agateau.com/tmp/sonnet
>
> rehighlightRequest is set to be a single shot timer in line 122. Would probably be cleaner to remove all other calls to setSingleShot().
It's fat *and* doesn't match the review description. :-)
Now seeing how you structured your patches behind the scene, I think some of them could have been squashed together. In any case, please make this kind of things clearer in the future, it was highly confusing to me (of course can happen easily since reviews don't map 1:1 with the commits).
I think it can go in *except* what touches sonnet/src/ui/highlighter.cpp, please open a separate review for that part since it's obviously a different thing (fixing a bug) and it still needs work.
- Kevin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111912/#review37408
-----------------------------------------------------------
On Aug. 8, 2013, 10:03 p.m., Aurélien Gâteau wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111912/
> -----------------------------------------------------------
>
> (Updated Aug. 8, 2013, 10:03 p.m.)
>
>
> Review request for KDE Frameworks.
>
>
> Description
> -------
>
> This patch introduces a new class: Sonnet::TextEditInstaller. It makes it easy to add spellcheck support to a QTextEdit.
>
> Spellcheck support means two things:
> 1. Install Sonnet::Highlighter to highlight spelling error.
> 2. Intercept context menu to replace it with a list of suggestions when user right-clicks on a misspelled word.
>
> Minimal usage is simple: create a new TextEditInstaller, passing it the QTextEdit as argument. The patch adds a test_textedit executable which demonstrates the class.
>
> I am posting it early to get feedback on the API and the class name, I am not completely happy with either.
>
> PS: This patch includes my plugin fixes [1], since it is useless without them.
> [1]: https://git.reviewboard.kde.org/r/111895/
>
>
> Diffs
> -----
>
> tier1/sonnet/src/ui/CMakeLists.txt 723d8f3
> tier1/sonnet/src/ui/highlighter.h c303db1
> tier1/sonnet/src/ui/highlighter.cpp 5c6a590
> tier1/sonnet/src/ui/spellcheckdecorator.h PRE-CREATION
> tier1/sonnet/src/ui/spellcheckdecorator.cpp PRE-CREATION
> tier1/sonnet/tests/CMakeLists.txt 6e0e450
> tier1/sonnet/tests/test_textedit.cpp PRE-CREATION
>
> Diff: http://git.reviewboard.kde.org/r/111912/diff/
>
>
> Testing
> -------
>
> Tested with test_textedit.
>
>
> Thanks,
>
> Aurélien Gâteau
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130813/23fbdfd6/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list