From: Jiang Jiang Date: Mon, 27 Jun 2011 08:15:39 +0000 (+0200) Subject: Only compare styleNames if they are not empty X-Git-Tag: qt-v5.0.0-alpha1~4132 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb6be57b38808273b3d302a782d68f31b3076894;p=profile%2Fivi%2Fqtbase.git Only compare styleNames if they are not empty Task-number: QTBUG-19366 (cherry picked from commit 15e6ac8f4d9e7a419cd0c10405954bde78559fac) Change-Id: I5f06bb5133f23dbc8ad6d745d44ca0a85ef49686 Reviewed-on: http://codereview.qt.nokia.com/760 Reviewed-by: Qt Sanity Bot Reviewed-by: Eskil Abrahamsen Blomfeldt --- 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