style argument of QFontDatabase::pointSizes() is optional

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-01-24 01:10:41 +02:00
parent a27cf3c38f
commit d622607fb3

View file

@ -535,7 +535,6 @@ bool QFontDatabase::isScalable(const QString &family, const QString &style) con
return isSmoothlyScalable(family, style);
}
/*!
\fn QList<int> QFontDatabase::pointSizes(const QString &family, const QString &style)
Returns a list of the point sizes available for the font with the
@ -554,7 +553,7 @@ QList<int> QFontDatabase::pointSizes(const QString &family, const QString &style
const QtFontFamily &fontfamily = db->at(i);
if (fontfamily.family.compare(parsedfamily, Qt::CaseInsensitive) != 0
|| (!parsedfoundry.isEmpty() && fontfamily.foundry.compare(parsedfoundry, Qt::CaseInsensitive) != 0)
|| !isStyleMatch(fontfamily.style, style)) {
|| (!style.isEmpty() && !isStyleMatch(fontfamily.style, style))) {
continue;
}
result.append(fontfamily.pointsize);