- Remove unneeded bool configIsRunning, add m_ prefix to configSessionNumber
- Remove unneeded inline keyword
Pro
- Much easier to add new options/settings
- Less ever the same boring code
Cons
- Slower access
- Presumably more memory consumption
Notes
- Only three example settings in use, "Word Wrap"/bool, "Word Wrap Column"/int and "Indentation Mode"/string
- No use of enum as key, but const char *, to keep it simple
- Use Q_ASSERT to avoid wrong written keys
TODO/NeedHelp
- See code comments
- FIX constness of getter functions
- Apply in a general way to
- DocumentPrivate::readVariableLine
- KateCommands::CoreCommands
- VariableLineEdit::addKateItems
- Finish/improve documentation
Questions/Hints
- See code comments
- Is setting "BackupFlags" really needed?
- Are all these SomeClass:: get/set functions really needed? e.g: DocumentPrivate::wordWrapAt() seems to be unused; DocumentPrivate::setWordWrapAt(uint col) effective only 4 times used; Instead is often accessed directly by doc->config()->foo(); So perhaps could the way over fooClass()->config() be done in general