diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-06-02 14:09:58 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-06-02 14:13:11 (GMT) |
commit | ad46e77420449ede2cb6c1ea2a810a2614520db9 (patch) | |
tree | 87842b98bd017d46ad6a893be8646271bb18bbcd /src/gui/text/qfontdatabase_mac.cpp | |
parent | d7700105933b3c4071f8df524915dbaa2092d82b (diff) | |
download | Qt-ad46e77420449ede2cb6c1ea2a810a2614520db9.zip Qt-ad46e77420449ede2cb6c1ea2a810a2614520db9.tar.gz Qt-ad46e77420449ede2cb6c1ea2a810a2614520db9.tar.bz2 |
BT: Remove duplicate code and fix font parsing.
QFont has a feature that you can pass a comma-separated list and it will
walk through the list and match the font that it hits first. There's a
nice static function that X11 and Windows uses, but the Mac was using an
older copied version of it. This old version didn't handle quoting which
is what happens in the style sheet. So, using the same code makes
everything work well. As a bonus, Creator looks correct again.
Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/gui/text/qfontdatabase_mac.cpp')
-rw-r--r-- | src/gui/text/qfontdatabase_mac.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/gui/text/qfontdatabase_mac.cpp b/src/gui/text/qfontdatabase_mac.cpp index 80ddbd5..26d8687 100644 --- a/src/gui/text/qfontdatabase_mac.cpp +++ b/src/gui/text/qfontdatabase_mac.cpp @@ -281,14 +281,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script) } //find the font - QStringList family_list = req.family.split(QLatin1Char(',')); - // append the substitute list for each family in family_list - { - QStringList subs_list; - for(QStringList::ConstIterator it = family_list.constBegin(); it != family_list.constEnd(); ++it) - subs_list += QFont::substitutes(*it); - family_list += subs_list; - } + QStringList family_list = familyList(req); const char *stylehint = styleHint(req); if (stylehint) |