Fix a typo in QFontconfigDatabase
authorJiang Jiang <jiang.jiang@nokia.com>
Tue, 20 Mar 2012 08:56:00 +0000 (09:56 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 20 Mar 2012 16:30:32 +0000 (17:30 +0100)
Font family names for default families (Serif, Sans serif, Monospace)
was only taken from the first family in the array (aka. always Serif).

Change-Id: Ia326dc85e03819f1a72deda66aade348809d94da
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp

index a4d2778..7650d77 100644 (file)
@@ -453,9 +453,8 @@ void QFontconfigDatabase::populateFontDatabase()
     QSupportedWritingSystems ws;
     ws.setSupported(QFontDatabase::Latin);
 
-
-    QString familyQtName = QString::fromLatin1(f->qtname);
     while (f->qtname) {
+        QString familyQtName = QString::fromLatin1(f->qtname);
         registerFont(familyQtName,QString(),QFont::Normal,QFont::StyleNormal,QFont::Unstretched,true,true,0,f->fixed,ws,0);
         registerFont(familyQtName,QString(),QFont::Normal,QFont::StyleItalic,QFont::Unstretched,true,true,0,f->fixed,ws,0);
         registerFont(familyQtName,QString(),QFont::Normal,QFont::StyleOblique,QFont::Unstretched,true,true,0,f->fixed,ws,0);