diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-10-27 13:00:36 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-10-27 13:00:36 +0100 |
commit | 2eb26c170920d28213b71e549d5dac4663febb14 (patch) | |
tree | 8df5223ac114d758c2112a8fc787992175556418 /src/gui/text/qfontdatabase.cpp | |
parent | 49ddae28e0dcd1c59dd5d742cffedd5290d1224a (diff) | |
parent | 81998b4e8e440076bd22a9164f0a93481c0e597a (diff) |
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
src/gui/text/qfontdatabase.cpp
Change-Id: I6ac1f55faa22b8e7b591386fb67f0333d0ea443d
Diffstat (limited to 'src/gui/text/qfontdatabase.cpp')
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index dcd0521362..decf2fe121 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -91,9 +91,10 @@ static int getFontWeight(const QString &weightString) // order of "expense". // // A simple string test is the cheapest, so let's do that first. - if (s == QLatin1String("medium") || - s == QLatin1String("normal")) + if (s == QLatin1String("normal")) return QFont::Normal; + if (s == QLatin1String("medium")) + return qt_mediumFontWeight; if (s == QLatin1String("bold")) return QFont::Bold; if (s == QLatin1String("demibold") || s == QLatin1String("demi bold")) @@ -102,6 +103,10 @@ static int getFontWeight(const QString &weightString) return QFont::Black; if (s == QLatin1String("light")) return QFont::Light; + if (s == QLatin1String("thin")) + return qt_thinFontWeight; + if (s == QLatin1String("extralight")) + return qt_extralightFontWeight; // Next up, let's see if contains() matches: slightly more expensive, but // still fast enough. |