feat: load local directories for spellchecking (#6730)

Reviewed-by: pajlada <rasmus.karlsson+github@pajlada.com>
This commit is contained in:
Nerixyz
2026-01-10 13:00:44 +01:00
committed by GitHub
parent 4a56970101
commit b9e2035518
6 changed files with 82 additions and 86 deletions
@@ -248,9 +248,8 @@ void ExternalToolsPage::initLayout(GeneralPageView &layout)
"dictionaries in " %
formatRichNamedLink(getApp()->getPaths().dictionariesDirectory,
getApp()->getPaths().dictionariesDirectory) %
u". The file index.aff has to contain the affixes and "
u"index.dic "
u"must contain the dictionary (subject to change).");
u". Dictionaries are pairs of .aff (affixes) and .dic (dictionary) "
u"files.");
SettingWidget::checkbox("Check spelling by default",
s.enableSpellChecking)
@@ -268,14 +267,13 @@ void ExternalToolsPage::initLayout(GeneralPageView &layout)
std::vector<std::pair<QString, QVariant>> dictList{{"None", ""}};
std::ranges::transform(
getApp()->getSpellChecker()->getSystemDictionaries(),
getApp()->getSpellChecker()->getAvailableDictionaries(),
std::back_inserter(dictList), toItem);
if (dictList.size() > 1)
{
SettingWidget::dropdown(
"Fallback spellchecking dictionary (requires restart)",
s.spellCheckingFallback, dictList)
SettingWidget::dropdown("Default dictionary (requires restart)",
s.spellCheckingDefaultDictionary, dictList)
->addTo(layout);
}
}