From 9b0fab6b62df98519ebfab117f14b9d3465d8c68 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 21 Dec 2012 18:35:58 +0200 Subject: Update Qt internals to use QChar::Script ...and remove the outdated QUnicodeTables::Script enum. QFontEngineData now has one extra slot that never used (engines[QChar::Script_Inherited]). engines[QChar::Script_Unknown], if accessed, would be set with a Box engine instance, and could be used as a minor optimization some time later. In order to preserve the existing behavior, we map all scripts up to Latin to Common. Change-Id: Ide4182a0f8447b4bf25713ecc3fe8097b8fed040 Reviewed-by: Pierre Rossi Reviewed-by: Konstantin Ritt --- src/gui/text/qplatformfontdatabase.cpp | 7 +++---- 1 file changed, 3 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 6fd145d921..f3e573e313 100644 --- a/src/gui/text/qplatformfontdatabase.cpp +++ b/src/gui/text/qplatformfontdatabase.cpp @@ -276,8 +276,7 @@ void QPlatformFontDatabase::populateFontDatabase() option to fall back to the fonts given by \a fallbacks if \a fontEngine does not support a certain character. */ -QFontEngineMulti *QPlatformFontDatabase::fontEngineMulti(QFontEngine *fontEngine, - QUnicodeTables::Script script) +QFontEngineMulti *QPlatformFontDatabase::fontEngineMulti(QFontEngine *fontEngine, QChar::Script script) { return new QFontEngineMultiQPA(fontEngine, script); } @@ -286,7 +285,7 @@ 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, QUnicodeTables::Script script, void *handle) +QFontEngine *QPlatformFontDatabase::fontEngine(const QFontDef &fontDef, QChar::Script script, void *handle) { Q_UNUSED(script); Q_UNUSED(handle); @@ -310,7 +309,7 @@ QFontEngine *QPlatformFontDatabase::fontEngine(const QByteArray &fontData, qreal Returns a list of alternative fonts for the specified \a family and \a style and \a script using the \a styleHint given. */ -QStringList QPlatformFontDatabase::fallbacksForFamily(const QString family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script) const +QStringList QPlatformFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const { Q_UNUSED(family); Q_UNUSED(style); -- cgit v1.2.3