D11183: Sonnet: don't impose the default client
René J.V. Bertin
noreply at phabricator.kde.org
Fri Mar 9 15:56:16 UTC 2018
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180309/299e8e6a/attachment.html>
More information about the Kde-frameworks-devel
mailing list