diff options
Diffstat (limited to 'src/gui/text/qfont.cpp')
| -rw-r--r-- | src/gui/text/qfont.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 7ffb688c035..2b2f2a27fcd 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -1829,6 +1829,8 @@ bool QFont::operator==(const QFont &f) const */ bool QFont::operator<(const QFont &f) const { + // NB: This operator actually implements greater-than, because it consistently + // swaps LHS (should be *this, but is `f`) and RHS (should be `f`, but is *this) if (f.d == d) return false; // the < operator for fontdefs ignores point sizes. const QFontDef &r1 = f.d->request; @@ -2199,7 +2201,7 @@ QString QFont::toString() const fontDescription += comma + QString::number(sortedFeatures.size()); for (const auto &[tag, value] : std::as_const(sortedFeatures).asKeyValueRange()) - fontDescription += comma + tag.toString() + u'=' + QString::number(value); + fontDescription += comma + QLatin1StringView{tag.toString()} + u'=' + QString::number(value); return fontDescription; } |
