Bug 345541 - Automatic spell checking enabled by default option ignored
Summary: Automatic spell checking enabled by default option ignored
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (other bugs)
Version First Reported In: 5.0.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-26 11:27 UTC by daniel_shub
Modified: 2019-05-26 15:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description daniel_shub 2015-03-26 11:27:57 UTC
The option configure Kate >> Editor Component  >> Editing  >> Spellcheck >> Automatic spell checking enabled by default seems to be ignored.

Reproducible: Always

Steps to Reproduce:
1. Under configure Kate >> Editor Component  >> Editing  >> Spellcheck, enable the option "Automatic spell checking enabled by default"
2. Restart Kate
3. Create a new document
4. Looking at Tools >> Spelling the option "Automatic spell checking"

Actual Results:  
Under the option Tools >> Spelling the option "Automatic spell checking" is not enabled by default and typing mispelled words does not result in them being underlined in red.

Expected Results:  
I expected the option to be enabled on new documents after restarting Kate and for mispelled words to be detected.

My katerc file has:

[Spelling]
backgroundCheckerEnabled=true
checkUppercase=true
checkerEnabledByDefault=true
defaultClient=
defaultLanguage=en_US
skipRunTogether=false

but "checkerEnabledByDefault" does not depend on if the "Automatic spell checking enabled by default" option and is enabled or not.
Comment 1 Kåre Särs 2015-03-28 22:16:31 UTC
It seems a bit strange the way it works. Aplying the change in the settings page influenes the global sonet setting, not only kate. 

The global sonet setting is using QSetting while Kate is trying to read :
KConfigGroup configGroup(KSharedConfig::openConfig(), "Spelling");

I don't think kate should write to the global sonet setting... but if that is the wanted behaviour kate should read the QSetting in stead...

I think kate should default to using the sonet setting but enable overiding it without changing the sonet setting.

Regards,
   Kåre.
Comment 2 daniel_shub 2015-03-30 08:37:20 UTC
> The global sonet setting is using QSetting while Kate is trying to read :
> KConfigGroup configGroup(KSharedConfig::openConfig(), "Spelling");

Is there a work around then? Can I manually add something to katerc, or some other configuration file?
Comment 3 Kåre Särs 2015-03-30 09:18:04 UTC
Yes you can add the following to your KF5 katerc:
[Spelling]
checkerEnabledByDefault=true

But be warned. It takes me ~2 minutes to open a session with 340 files when I have that enabled. I need to check this also. 

Part of the problem is probably that sonnet has moved away from KConfig in the KF5 port and that previously the sonnet configs where saved with the applications own configs and now it saves it in the global config....
Comment 4 Matt Scheirer 2019-05-26 15:00:19 UTC
This seems to have been fixed some time in the intervening years, automatic spellcheck toggle is working fine and persisting properly. No entries in katerc required - it all looks to route to Sonnet properly now, at least as of 19.04.