summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-11-11 14:57:11 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-11-11 15:16:41 (GMT)
commit2b6fd0a7bdac686a41d7fbbe47ad3ded9e1d77b5 (patch)
treebe33c57eabcb3dc2ac58b950478317b2191114e4 /src/gui
parentad5f41c02daa0278902d0e8273c8cd34efd2d6da (diff)
downloadQt-2b6fd0a7bdac686a41d7fbbe47ad3ded9e1d77b5.zip
Qt-2b6fd0a7bdac686a41d7fbbe47ad3ded9e1d77b5.tar.gz
Qt-2b6fd0a7bdac686a41d7fbbe47ad3ded9e1d77b5.tar.bz2
Small caps font variant wouldn't be used when defined through style sheets
The font comparison (operator==) didn't check the capital attribute, which is the one responsible for this variant. Now it does. Auto-test updated. Reviewed-by: Samuel Reviewed-by: Olivier
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qfont.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 447087c..f1cd6bb 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1613,7 +1613,8 @@ bool QFont::operator==(const QFont &f) const
&& f.d->underline == d->underline
&& f.d->overline == d->overline
&& f.d->strikeOut == d->strikeOut
- && f.d->kerning == d->kerning));
+ && f.d->kerning == d->kerning
+ && f.d->capital == d->capital));
}
@@ -1645,6 +1646,7 @@ bool QFont::operator<(const QFont &f) const
#ifdef Q_WS_X11
if (r1.addStyle != r2.addStyle) return r1.addStyle < r2.addStyle;
#endif // Q_WS_X11
+ if (f.d->capital != d->capital) return f.d->capital < d->capital;
int f1attrs = (f.d->underline << 3) + (f.d->overline << 2) + (f.d->strikeOut<<1) + f.d->kerning;
int f2attrs = (d->underline << 3) + (d->overline << 2) + (d->strikeOut<<1) + d->kerning;