Commit 8bf4efd7 authored by Mikhail Zolotukhin's avatar Mikhail Zolotukhin
Browse files

Correctly process font, that has multiple words in family name

Summary:
Separate family from other font characteristics with comma. It
partially solves the issue, because font dialog in Fonts KCM
allows you to choose the font with family name, constructed
with the font style.

BUG: 380980
FIXED-IN: 5.18.0

Test Plan:
# Restart `kded5`
# Change font in Fonts KCM to one, which name consist of two or more words separated with spaces
# GTK applications should now correctly use that font

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26928
parent 66ab37df
......@@ -46,7 +46,7 @@ QString ConfigValueProvider::fontName() const
QString fontAsString = configGroup.readEntry(QStringLiteral("font"), defaultFont.toString());
static QFont font;
font.fromString(fontAsString);
return font.family() + ' ' + font.styleName() + ' ' + QString::number(font.pointSize());
return font.family() + QStringLiteral(", ") + font.styleName() + ' ' + QString::number(font.pointSize());
}
QString ConfigValueProvider::iconThemeName() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment