<table><tr><td style="">fvogt added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D9070" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Oh, now I understand: It fixes the issue that the styleName was prefilled with the stylename of the default font and fromString might not reset it.<br />
IMO that's a feature though and is the expected behaviour. For instance, if we change the default window title to be bold, users with "windowTitle=Comic Sans" will also have a bold title.</p>
<p>qtbase's src/gui/text/qfont.cpp says:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">setFamily(l[0].toString());
if (count > 1 && l[1].toDouble() > 0.0)
setPointSizeF(l[1].toDouble());
if (count == 9) {
setStyleHint((StyleHint) l[2].toInt());
setWeight(qMax(qMin(99, l[3].toInt()), 0));
setItalic(l[4].toInt());
setUnderline(l[5].toInt());
setStrikeOut(l[6].toInt());
setFixedPitch(l[7].toInt());
} else if (count >= 10) {
if (l[2].toInt() > 0)
setPixelSize(l[2].toInt());
setStyleHint((StyleHint) l[3].toInt());
setWeight(qMax(qMin(99, l[4].toInt()), 0));
setStyle((QFont::Style)l[5].toInt());
setUnderline(l[6].toInt());
setStrikeOut(l[7].toInt());
setFixedPitch(l[8].toInt());
if (count == 11)
d->request.styleName = l[10].toString();
else
d->request.styleName.clear();
}</pre></div>
<p>So just specifying exactly 10 parameters as part of the config key should have the exact same effect.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R135 Integration for Qt applications in Plasma</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9070" rel="noreferrer">https://phabricator.kde.org/D9070</a></div></div><br /><div><strong>To: </strong>rjvbb<br /><strong>Cc: </strong>fvogt, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>