<table><tr><td style="">rjvbb created this revision.<br />rjvbb added a reviewer: Frameworks.<br />Restricted Application added a project: Frameworks.<br />rjvbb requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11183">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Sonnet has a hidden default client concept (hidden because the standard configuration dialog doesn't expose the setting).</p>

<p>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 <tt style="background: #ebebeb; font-size: 13px;">defaultClient</tt>, even if other backends do offer support.</p>

<p>This change relaxes the implementation in <tt style="background: #ebebeb; font-size: 13px;">Loader::createSpeller()</tt>. When called with an empty <tt style="background: #ebebeb; font-size: 13px;">clientName</tt> argument if will now check if the <tt style="background: #ebebeb; font-size: 13px;">defaultClient</tt> supports the requested language. This test will also catch cases where the configuration file (Sonnet.ini) sets <tt style="background: #ebebeb; font-size: 13px;">defaultClient</tt> to an inexistent client (e.g. one that is no longer available).</p>

<p>With this change the term "default" is more appropriate for the resulting behaviour: <tt style="background: #ebebeb; font-size: 13px;">defaultClient</tt> 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.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Works as expected on Mac and Linux, with the shipped examples and with Kate.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R246 Sonnet</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11183">https://phabricator.kde.org/D11183</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/core/loader.cpp</div></div></div><br /><div><strong>To: </strong>rjvbb, Frameworks<br /><strong>Cc: </strong>Frameworks, michaelh<br /></div>