ViewConfig: Use new generic config interface
ClosedPublic

Authored by loh.tar on Apr 30 2019, 6:42 PM.

Details

Summary

This is a somehow raw transition, autotests are adapted too and still working
but there may still some adjustments needed, like value validators, fix
accidentally wrong converted default settings or whatever else.

These two changes may cause some incompatibilities, too bad, but very nice
in the long term:

  • Use the power of new the interface in ViewPrivate::setConfigValue
  • Use the power of new the interface in DocumentPrivate::setViewVariable

With that we will have soon everywhere the same keys and the possibility
literally to set each setting by document variables or the F7 command line
without extra needed work for new options in the future.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
loh.tar created this revision.Apr 30 2019, 6:42 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptApr 30 2019, 6:42 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
loh.tar requested review of this revision.Apr 30 2019, 6:42 PM

Ah, last hint: The diff is not against master. Should you really like to try it, I can fix that earlier, otherwise will do it when I'm done

loh.tar updated this revision to Diff 57293.Apr 30 2019, 8:58 PM
loh.tar edited the summary of this revision. (Show Details)
  • ShowScrollBarPreview
  • ShowScrollBarMarks
  • ShowLineNumbers
  • Add some validator functions, please look at them
dhaumann accepted this revision.May 1 2019, 6:46 AM
dhaumann added a subscriber: dhaumann.

I read the diff carefully, please commit.

src/utils/kateconfig.h
964

Are training commas allowed meanwhile?

This revision is now accepted and ready to land.May 1 2019, 6:46 AM
loh.tar added inline comments.May 1 2019, 7:22 AM
src/utils/kateconfig.h
964

Yes. It's handy while still on work here, but can remove it when I'm done, if desired.
Thanks for your look, pls do it again later.

loh.tar updated this revision to Diff 57300.May 1 2019, 7:27 AM
loh.tar edited the summary of this revision. (Show Details)
  • Rebase on master
  • ShowScrollBarMiniMap
  • ShowScrollBarMiniMapAll
  • ScrollBarMiniMapWidth
loh.tar updated this revision to Diff 57309.May 1 2019, 12:18 PM
loh.tar edited the summary of this revision. (Show Details)
  • Use the power of new the interface in ViewPrivate::setConfigValue
  • Add missed finalizeConfigEntries() call
  • Add check to finalizeConfigEntries() for key to be unique
  • ShowIconBar
  • ShowScrollbars
loh.tar updated this revision to Diff 57323.May 1 2019, 3:55 PM
loh.tar edited the summary of this revision. (Show Details)
  • Use the power of new the interface in DocumentPrivate::setViewVariable
  • ShowFoldingPreview
  • ShowLineModification
  • ShowFoldingBar
loh.tar updated this revision to Diff 57346.May 1 2019, 9:18 PM
loh.tar edited the summary of this revision. (Show Details)
  • BookmarkSorting
  • AutoCenterLines
  • DefaultMarkType
  • PersistentSelection
  • InputMode
  • ViInputModeStealKeys
  • ViRelativeLineNumbers
  • AutomaticCompletionInvocation
  • WordCompletion
  • KeywordCompletion
  • WordCompletionMinimalWordLength
  • WordCompletionRemoveTail

7 more and we are done :-/

loh.tar updated this revision to Diff 57354.May 2 2019, 4:31 AM
loh.tar retitled this revision from [WIP] ViewConfig: Use new generic config interface to ViewConfig: Use new generic config interface .
loh.tar edited the summary of this revision. (Show Details)
loh.tar edited the test plan for this revision. (Show Details)
  • Last missed settings
  • Some cleanup
cullmann accepted this revision.May 2 2019, 11:09 AM
cullmann added a subscriber: cullmann.

I think this look OK.
Can't verify every replacement is correct, but let's have that in now.
Thanks for that massive amount of work ;=)

This revision was automatically updated to reflect the committed changes.

PS: I know this comment comes too late, but this could have waited 2 more days after the next KF5 tag tomorrow :-) we had 1 day of testing now. Maybe we are lucky and there is no regression - let's try now.