Logcat: fix dsError color with underline="0"

Authored by nibags on Mar 2 2019, 6:42 AM.



In itemData's, using dsError with underline="0" doesn't work, the text is underlined.
Therefore, dsError is changed by dsWarning.

I don't know the origin of this bug, this is a temporary solution for the Logcat highlighter.
This bug isn't noticeable in the autotests files, there are no changes when run make test.

Test Plan

make test

Diff Detail

R216 Syntax Highlighting
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
nibags created this revision.Mar 2 2019, 6:42 AM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptMar 2 2019, 6:42 AM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
nibags requested review of this revision.Mar 2 2019, 6:42 AM
cullmann requested changes to this revision.Mar 2 2019, 2:07 PM

Could you add some constructs to the auto-test that show the issue?
That way we can later better validate some proper fix.

This revision now requires changes to proceed.Mar 2 2019, 2:07 PM
nibags updated this revision to Diff 53099.Mar 4 2019, 7:25 AM
  • Add tests
nibags added a comment.Mar 4 2019, 7:36 AM

Not seem, from what I see it is a recent bug. I just checked it in KDE Frameworks 5.48.0 (Fedora 28) and it works correctly

Question: I just applied this but adjust the hl back to

<itemData name="Error Tag" defStyleNum="dsError" bold="1" underline="0" />
<itemData name="Error Message" defStyleNum="dsError" bold="0" underline="0" />

For me the tests still work and I see no underline.

Is the patch then at all needed for current master?

nibags added a comment.Mar 5 2019, 6:37 AM

I still have problems with dsError + underline="0" :(
In "autotest/html" these aren't underlined, but when I open the file "test.logcat" with Kate, it's underlined.
I even tried creating a new Unix user, but the problem persists (I'm using KDE Frameworks 5.55.0).
Even removing the underlines in "Configure Kate -> Fonts & Colors", the problem persists.
Also clarify that the file "$HOME/.config/katesyntaxhighlightingrc" doesn't exist.

I will check well this before sending it

If it is only borked in Kate, that might be https://bugs.kde.org/show_bug.cgi?id=143399

cullmann accepted this revision.Mar 5 2019, 8:36 PM

But lets think about KTextEditor issues on an other day and first have this workaround + the nice unit test.

This revision is now accepted and ready to land.Mar 5 2019, 8:36 PM

I want to check the colors of this highlighter before doing the commit

nibags updated this revision to Diff 53426.Mar 8 2019, 11:01 AM
  • Update styles

Yes, this corresponds to the bug you mention.
In the "Vim (dark)" scheme, bold="0" doesn't work either, since all the text is bold.

This revision was automatically updated to reflect the committed changes.