summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase_qpa.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2012-07-11 14:39:54 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-14 08:56:02 +0100
commitfa7661d8b25fa338649a301010e1b5a2b63da731 (patch)
treeabcc7217685ddb3175dcbf2589727448d72c9a28 /src/gui/text/qfontdatabase_qpa.cpp
parent3c09f6bc9aee0c97427fe8da6efdc73b4ac473aa (diff)
Fix styleName support in QPA font database
Font styleName support was disconnected since Qt switched to QPA fontdatabase. Now add the code from Qt 4.8 back to enable this in QPA. Change-Id: Iab2cbfd5468f87542183348c2123ca4b2c270692 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/gui/text/qfontdatabase_qpa.cpp')
-rw-r--r--src/gui/text/qfontdatabase_qpa.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp
index 22aacf1dcd..2ecab9ebf9 100644
--- a/src/gui/text/qfontdatabase_qpa.cpp
+++ b/src/gui/text/qfontdatabase_qpa.cpp
@@ -52,7 +52,8 @@
QT_BEGIN_NAMESPACE
-Q_GUI_EXPORT void qt_registerFont(const QString &familyName, const QString &foundryname, int weight,
+Q_GUI_EXPORT void qt_registerFont(const QString &familyName, const QString &stylename,
+ const QString &foundryname, int weight,
QFont::Style style, int stretch, bool antialiased,
bool scalable, int pixelSize, bool fixedPitch,
const QSupportedWritingSystems &writingSystems, void *handle)
@@ -75,7 +76,7 @@ Q_GUI_EXPORT void qt_registerFont(const QString &familyName, const QString &fou
}
QtFontFoundry *foundry = f->foundry(foundryname, true);
- QtFontStyle *fontStyle = foundry->style(styleKey, QString(), true);
+ QtFontStyle *fontStyle = foundry->style(styleKey, stylename, true);
fontStyle->smoothScalable = scalable;
fontStyle->antialiased = antialiased;
QtFontSize *size = fontStyle->pixelSize(pixelSize ? pixelSize : SMOOTH_SCALABLE, true);