summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfont.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-06-27 10:15:39 +0200
committerJiang Jiang <jiang.jiang@nokia.com>2011-06-27 10:15:55 +0200
commit15e6ac8f4d9e7a419cd0c10405954bde78559fac (patch)
tree440c058356ae0df954137ca9009fd67d88ea9039 /src/gui/text/qfont.cpp
parent1481955dd93acea1c5cf684e3f753d80f614e9bf (diff)
Only compare styleNames if they are not empty
Task-number: QTBUG-19366
Diffstat (limited to 'src/gui/text/qfont.cpp')
-rw-r--r--src/gui/text/qfont.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index e771b070ed..2d6af3b662 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -147,7 +147,7 @@ bool QFontDef::exactMatch(const QFontDef &other) const
&& weight == other.weight
&& style == other.style
&& this_family == other_family
- && styleName == other.styleName
+ && (styleName.isEmpty() || other.styleName.isEmpty() || styleName == other.styleName)
&& (this_foundry.isEmpty()
|| other_foundry.isEmpty()
|| this_foundry == other_foundry)