loh.tar created this revision. loh.tar added reviewers: cullmann, dhaumann. Herald added projects: Kate, Frameworks. Herald added subscribers: kde-frameworks-devel, kwrite-devel. loh.tar requested review of this revision.
REVISION SUMMARY - 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 REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D18894 AFFECTED FILES autotests/src/katedocument_test.cpp src/completion/katecompletionconfig.h src/dialogs/katedialogs.cpp src/document/editorconfig.cpp src/document/katebuffer.cpp src/document/katedocument.cpp src/render/katerenderer.cpp src/utils/kateautoindent.cpp src/utils/katecmds.cpp src/utils/kateconfig.cpp src/utils/kateconfig.h src/variableeditor/variablelineedit.cpp src/view/kateviewinternal.cpp To: loh.tar, cullmann, dhaumann Cc: kwrite-devel, kde-frameworks-devel, #ktexteditor, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann