Fix problem that font/italic/... attributes no longer work with e.g. >= Qt 5.9
ClosedPublic

Authored by cullmann on Apr 15 2018, 11:06 AM.

Details

Summary

On e.g. openSUSE 15.0, which has 5.9 as default Qt, bold/italic/... styles no longer work.
The styleName() property overwrites them.
My patch just patches that away before setting the font.
That seems to work fine.

Test Plan

Without patch: e.g. no bold if() constructs in C++ after setting the font once over the font chooser.
With patch: sane styling again.

Diff Detail

Repository
R39 KTextEditor
Lint
Lint Skipped
Unit
Unit Tests Skipped
cullmann created this revision.Apr 15 2018, 11:06 AM
Restricted Application added projects: Kate, Frameworks. ยท View Herald TranscriptApr 15 2018, 11:06 AM
cullmann requested review of this revision.Apr 15 2018, 11:06 AM
dhaumann accepted this revision.Apr 15 2018, 11:35 AM
dhaumann added a subscriber: dhaumann.

A simple fix for a severe issue - please commit!

This revision is now accepted and ready to land.Apr 15 2018, 11:35 AM

Btw there are bug reports for this. Could you link the Kate related ones, if existing?

Btw there are bug reports for this. Could you link the Kate related ones, if existing?

I failed to find them :(
I remembered that this was brought up some time ago, but I had no time to take a look at that time.
And now I no longer find the mails/bugs :P

cullmann closed this revision.Apr 15 2018, 11:41 AM

Git commit 4d91fa7e918d983e6569798dfe20c7c9faf4bb9e by Christoph Cullmann.
Committed on 15/04/2018 at 11:36.
Pushed by cullmann into branch 'master'.

Fix problem that font/italic/... attributes no longer work with e.g. >= Qt 5.9

CHANGELOG: Fix missing bold/italic/... markup with modern Qt versions (>= 5.9)

Differential Revision: https://phabricator.kde.org/D12221

Perhaps the fix is only a hack, but at least it solves the issue for me on my company workstation ;=)
I was confused what did look strange after the upgrade, until I noticed the missing bold keywords.

Nice fix, but it would be a shame if every client needs to work around this in the same way. I'm still holding out hope for a fix to KFontRequester, if possible.

@ngraham So what is the current state of a proper fix in KFontRequester?

@dhaumann Please note that Phabricator review closing can take a few minutes to be processed.

ngraham added a subscriber: rjvbb.Apr 16 2018, 3:07 AM

@ngraham So what is the current state of a proper fix in KFontRequester?

I have no idea, sorry. The issue is honestly too complicated for me to understand at this point. @rjvbb would be able to explain it better than I.

rjvbb added a comment.Apr 16 2018, 6:26 AM

Actually, no. I haven't been following that part at all (and am taking 2 weeks off of intensive dev stuff ;) )