From 903b9d41f7894610b100fd3ed9dff1ac60011fd1 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 5 Feb 2014 00:10:24 +0200 Subject: Decrease code duplication Check engine's supported scripts in a single place and remove unused script parameter from fontEngine(). Change-Id: Ic153803bef519320c370b058e77eac1a4d92afd0 Reviewed-by: Lars Knoll --- src/gui/text/qplatformfontdatabase.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/gui/text/qplatformfontdatabase.cpp') diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp index 37610a9099..7936831e13 100644 --- a/src/gui/text/qplatformfontdatabase.cpp +++ b/src/gui/text/qplatformfontdatabase.cpp @@ -289,13 +289,11 @@ QFontEngineMulti *QPlatformFontDatabase::fontEngineMulti(QFontEngine *fontEngine Returns the font engine that can be used to render the font described by the font definition, \a fontDef, in the specified \a script. */ -QFontEngine *QPlatformFontDatabase::fontEngine(const QFontDef &fontDef, QChar::Script script, void *handle) +QFontEngine *QPlatformFontDatabase::fontEngine(const QFontDef &fontDef, void *handle) { - Q_UNUSED(script); - Q_UNUSED(handle); QByteArray *fileDataPtr = static_cast(handle); QFontEngineQPA *engine = new QFontEngineQPA(fontDef,*fileDataPtr); - //qDebug() << fontDef.pixelSize << fontDef.weight << fontDef.style << fontDef.stretch << fontDef.styleHint << fontDef.styleStrategy << fontDef.family << script; + //qDebug() << fontDef.pixelSize << fontDef.weight << fontDef.style << fontDef.stretch << fontDef.styleHint << fontDef.styleStrategy << fontDef.family; return engine; } -- cgit v1.2.3