From c874e10cbcf67fa5fdddafc4dcbf8a54d7f36b2d Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 1 May 2015 08:18:36 +0400 Subject: Simplify QFontDatabase::findFont() QFontDatabase::load() is the only caller that passes non-null QFontPrivate* to QFontDatabase::findFont(), to adjust the pointSize with regards to the font's dpi; do that right in QFontDatabase::load(). The `multi` param's meaning is, in fact, an absence of the QFont::NoFontMerging flag, so prefer the latter and prevent ambiguity in the future. Change-Id: Icc7751044e454ca438e7627364faa415287bf1ae Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfontengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/text/qfontengine.cpp') diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index b028d868b9..87e6c30afe 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1641,7 +1641,7 @@ QFontEngine *QFontEngineMulti::loadEngine(int at) request.styleStrategy |= QFont::NoFontMerging; request.family = fallbackFamilyAt(at - 1); - if (QFontEngine *engine = QFontDatabase::findFont(m_script, /*fontprivate = */0, request, /*multi = */false)) { + if (QFontEngine *engine = QFontDatabase::findFont(request, m_script)) { engine->fontDef = request; return engine; } -- cgit v1.2.3