Skip to content

kcm_fonts: Make the font selection dialog select the correct "Regular"-like style

Ahmad Samir requested to merge work/ahmad/kcm-fonts-5.18 into Plasma/5.18

Due to KConfig dropping QFont styleName property (for "Regular"-like font styles, see [1] for more details), the font selection dialog invoked by the KCM could end up selecting the wrong style; this change sets the appropriate "Regular" style on the QFont object before invoking the font selection dialog to fix/workaround the issue.

Note that in Plasma master branch the issue is handled differently, since we switched from QFontDialog to KFontChooserDialog (the latter has that logic built-in).

[1] https://phabricator.kde.org/D27735

CCBUG: 420287

Merge request reports