Proposal: Add "None" highlighting to repository per default
ClosedPublic

Authored by cullmann on Aug 12 2018, 11:35 AM.

Details

Summary

Rational: e.g. KTextEditor uses the repository to manage all syntax definitions.
But to allow the user to use "None" as highlighting, we special case that everywhere and use there Definition().
I think it would be much cleaner if the "None" definition is just part of the repository.
An other approach would be to be able to add it later ourself.

Test Plan

With this patch applied, I can just use definitions() everywhere in KTextEditor KateSyntaxManager without any special casing.

Diff Detail

Repository
R216 Syntax Highlighting
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cullmann created this revision.Aug 12 2018, 11:35 AM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptAug 12 2018, 11:35 AM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
cullmann requested review of this revision.Aug 12 2018, 11:35 AM

Problem: How to get the "None" into the translation catalog?

cullmann updated this revision to Diff 39515.Aug 12 2018, 12:36 PM

Fixes translation + code editor example.
No special handling needed there (+ fix for section without name)

:=) Perhaps I should fix the unit tests, too.

cullmann updated this revision to Diff 39522.Aug 12 2018, 1:53 PM

make test shall work again ;=)

Hi, is that change acceptable?
I would need it to continue on my other KTextEditor patches that will not work without this :=)

vkrause accepted this revision.Aug 13 2018, 9:33 AM
This revision is now accepted and ready to land.Aug 13 2018, 9:33 AM
This revision was automatically updated to reflect the committed changes.