dfaure created this revision.
dfaure added reviewers: sandsmark, mlaurent.
Restricted Application added a project: Frameworks.

REVISION SUMMARY
  When AutoDetectLanguage is set, the same document can contain multiple
  languages. In that case, Highlighter stores the language information
  into the block's userdata, and changes the spellchecker language at
  every change. So the suggestions were using whatever was the language
  of the last block that was checked, which led to pretty random behaviour
  for the user.
  
  Fixed by using a QTextCursor to retrieve the cached language for the
  word we're showing suggestions for.
  
  Includes a separate commit for Loader:
  
    honour Settings::defaultClient(), useful for unittests.

TEST PLAN
  Spellchecking in kmail composer, writing text in French
  and having a signature with word in English.

REPOSITORY
  R246 Sonnet

BRANCH
  master

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

AFFECTED FILES
  autotests/CMakeLists.txt
  autotests/test_highlighter.cpp
  src/core/loader.cpp
  src/ui/highlighter.cpp
  src/ui/highlighter.h
  src/ui/spellcheckdecorator.cpp

To: dfaure, sandsmark, mlaurent
Cc: #kde_pim, #frameworks

Reply via email to