feat: linux-only system dictionary spell checking (#6703)

Reviewed-by: Nerixyz <nerixdev@outlook.de>
This commit is contained in:
pajlada
2026-01-04 11:13:30 +01:00
committed by GitHub
parent 0f58bc3410
commit 5dda451238
7 changed files with 232 additions and 23 deletions
@@ -5,6 +5,7 @@
#include "common/Env.hpp"
#include "controllers/commands/CommandContext.hpp"
#include "controllers/notifications/NotificationController.hpp"
#include "controllers/spellcheck/SpellChecker.hpp"
#include "messages/Image.hpp"
#include "messages/Message.hpp"
#include "messages/MessageBuilder.hpp"
@@ -202,6 +203,18 @@ QString debugTest(const CommandContext &ctx)
getApp()->getUpdates().checkForUpdates();
ctx.channel->addSystemMessage(QString("checking for updates"));
}
else if (command == "spellcheck-get-system-dictionaries")
{
#ifdef CHATTERINO_WITH_SPELLCHECK
auto dicts = getApp()->getSpellChecker()->getSystemDictionaries();
for (const auto &dict : dicts)
{
ctx.channel->addSystemMessage(QString("system dictionary: %1 at %2")
.arg(dict.name)
.arg(dict.path));
}
#endif
}
else if (command == "save-settings")
{
ctx.channel->addSystemMessage(u"requesting settings save"_s);