rjvbb created this revision.
rjvbb added a reviewer: Frameworks.
Restricted Application added a project: Frameworks.
rjvbb requested review of this revision.

REVISION SUMMARY
  Sonnet has a hidden default client concept (hidden because the standard 
configuration dialog doesn't expose the setting).
  
  In the current implementation this client doesn't behave as one would expect 
from a default, but rather as an imposed choice. As a result, spell checking is 
disabled in practice in languages not supported by `defaultClient`, even if 
other backends do offer support.
  
  This change relaxes the implementation in `Loader::createSpeller()`. When 
called with an empty `clientName` argument if will now check if the 
`defaultClient` supports the requested language. This test will also catch 
cases where the configuration file (Sonnet.ini) sets `defaultClient` to an 
inexistent client (e.g. one that is no longer available).
  
  With this change the term "default" is more appropriate for the resulting 
behaviour: `defaultClient` will be used unless it doesn't offer the required 
language support. If that is the case, Sonnet will fall back to the most 
reliable available client that does support the language in question.

TEST PLAN
  Works as expected on Mac and Linux, with the shipped examples and with Kate.

REPOSITORY
  R246 Sonnet

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

AFFECTED FILES
  src/core/loader.cpp

To: rjvbb, #frameworks
Cc: #frameworks, michaelh

Reply via email to