summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfont
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-11-11 15:57:11 +0100
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-11-11 16:16:41 +0100
commit2b6fd0a7bdac686a41d7fbbe47ad3ded9e1d77b5 (patch)
treebe33c57eabcb3dc2ac58b950478317b2191114e4 /tests/auto/qfont
parentad5f41c02daa0278902d0e8273c8cd34efd2d6da (diff)
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 'tests/auto/qfont')
-rw-r--r--tests/auto/qfont/tst_qfont.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qfont/tst_qfont.cpp b/tests/auto/qfont/tst_qfont.cpp
index fa76e44fee..5622e10de7 100644
--- a/tests/auto/qfont/tst_qfont.cpp
+++ b/tests/auto/qfont/tst_qfont.cpp
@@ -395,6 +395,13 @@ void tst_QFont::compare()
font.setOverline(false);
QVERIFY( font == font2 );
QVERIFY(!(font < font2));
+
+ font.setCapitalization(QFont::SmallCaps);
+ QVERIFY( font != font2 );
+ QCOMPARE(font < font2,!(font2 < font));
+ font.setCapitalization(QFont::MixedCase);
+ QVERIFY( font == font2 );
+ QVERIFY(!(font < font2));
}
#if defined(Q_WS_X11)