RFC: spell checking for QTextEdit

Kevin Krammer krammer at kde.org
Wed Aug 7 10:57:55 UTC 2013


On Wednesday, 2013-08-07, Aurélien Gâteau wrote:

> A. Find a way to inject spellchecking in all QTextEdit through either QPA
> or our style.
> 
> Pros:
> - Completely transparent to Qt app developers
> - Porting a KDE app to KF5 is only KTextEdit => QTextEdit
> 
> Cons:
> - Depends on QPA and/or style, so won't always be available depending on
> the platform
> - Could cause problems if spellchecking is injected in QTextEdit where it
> makes no sense to provide this feature (eg. code editor)
> 
> 
> B. Only provide Sonnet::TextEditInstaller, which app developers would then
> have to explicitly use to add spell checking to QTextEdit in their
> applications.
> 
> Pros:
> - No under-the-hood hack
> - Independant from the platform as long as we have Sonnet plugins for it
> - Gives more control to the app developer: for example changing the
> spelling language, adding custom words to ignore, or ignoring blocks of
> text (think quoted email)
> 
> Cons:
> - Requires developers to explicitly use the API, so porting a KDE app to
> KF5 is KTextEdit => QTextEdit + use Sonnet::TextEditInstaller.
> 
> 
> I am personnaly in favor of B), but would like to hear others opinions.

I also think (B) is the cleaner approach.
Having spellchecking is a choice, the application developer has the best 
knowledge about whether a text edit will be used for natural language input or 
some code like text which would only confuse the spell checker anyway.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130807/7fc98721/attachment.sig>


More information about the Kde-frameworks-devel mailing list