D9491: Sonnet: fix wrong language for suggestions in mixed-language texts

Dominik Haumann noreply at phabricator.kde.org
Sun Dec 24 11:59:33 GMT 2017


dhaumann accepted this revision.
dhaumann added a comment.


  Good enough :)

INLINE COMMENTS

> highlighter.cpp:487
> +    QStringList suggestions = d->spellchecker->suggest(word);
> +    if (max != -1 && suggestions.count() > max) {
> +        suggestions = suggestions.mid(0, max);

I am not a big fan of -1 in this use case. What about -2 etc, or even 0? So this API easily leads to unexpected results.

But ok, my comment is unrelated to your patch.

REPOSITORY
  R246 Sonnet

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D9491

To: dfaure, sandsmark, mlaurent, dhaumann
Cc: dhaumann, #kde_pim, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20171224/f1bbd6b5/attachment.html>


More information about the kde-pim mailing list