Skip to content

runners/spellchecker: Add automatic language detection of search term

If the default dictionary returns an empty result, try to iterate over all available dictionaries (except the default one) to get the suggestion.

FEATURE: 439544

图片

Local test result

> ./build/bin/spellcheckerrunnertest 
********* Start testing of SpellCheckRunnerTest *********
Config: Using QtTest library 5.15.2, Qt 5.15.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 11.2.1 20220103 [revision d4a1d3c4b377f1d4acb34fe1b55b5088a3f293f6]), opensuse-tumbleweed 20220227
PASS   : SpellCheckRunnerTest::initTestCase()
PASS   : SpellCheckRunnerTest::testDefaultDictionary()
PASS   : SpellCheckRunnerTest::testSpecifiedDictionary()
PASS   : SpellCheckRunnerTest::testAutomaticDictionary()
PASS   : SpellCheckRunnerTest::testSuggestions()
PASS   : SpellCheckRunnerTest::cleanupTestCase()
Totals: 6 passed, 0 failed, 0 skipped, 0 blacklisted, 422ms
********* Finished testing of SpellCheckRunnerTest *********
Edited by Fushan Wen

Merge request reports

Loading