Populate the font database when calling fallbacksForFamily().

The Mac platform requires populating the font database to build the
fallback list for font families.

Change-Id: I5bd63cd3c5fa6216c312d439390681f160a716fb
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
This commit is contained in:
Zeno Albisser 2012-05-16 16:13:48 +02:00 committed by Qt by Nokia
parent 617c026d65
commit 7701d8dc64

View File

@ -345,6 +345,8 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString family, cons
Q_UNUSED(family);
Q_UNUSED(style);
Q_UNUSED(script);
if (fallbackLists.isEmpty())
const_cast<QCoreTextFontDatabase*>(this)->populateFontDatabase();
return fallbackLists[styleHint];
}