summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-06-27 08:15:39 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-06-27 08:15:55 (GMT)
commit15e6ac8f4d9e7a419cd0c10405954bde78559fac (patch)
tree440c058356ae0df954137ca9009fd67d88ea9039
parent1481955dd93acea1c5cf684e3f753d80f614e9bf (diff)
downloadQt-15e6ac8f4d9e7a419cd0c10405954bde78559fac.zip
Qt-15e6ac8f4d9e7a419cd0c10405954bde78559fac.tar.gz
Qt-15e6ac8f4d9e7a419cd0c10405954bde78559fac.tar.bz2
Only compare styleNames if they are not empty
Task-number: QTBUG-19366
-rw-r--r--src/gui/text/qfont.cpp2
-rw-r--r--src/gui/text/qfont_p.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index e771b07..2d6af3b 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)
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h
index 4ae31c3..ebc842c 100644
--- a/src/gui/text/qfont_p.h
+++ b/src/gui/text/qfont_p.h
@@ -113,7 +113,7 @@ struct QFontDef
&& styleStrategy == other.styleStrategy
&& ignorePitch == other.ignorePitch && fixedPitch == other.fixedPitch
&& family == other.family
- && styleName == other.styleName
+ && (styleName.isEmpty() || other.styleName.isEmpty() || styleName == other.styleName)
&& hintingPreference == other.hintingPreference
#ifdef Q_WS_X11
&& addStyle == other.addStyle