summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2012-02-03 14:28:16 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-17 05:26:44 +0100
commitcb8445f0323b0eefbb04f1d8adad81a00b53abd8 (patch)
tree502411d2ce366cb25a1ac9424eb314c320ece905 /tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
parent2801db558c56e98753e297c1aeabd4fd2975e09a (diff)
Remove historical +1 from font height calculation
Historically, we've calculated font height as ascent+descent+1. In Qt 4, a patch was added to work around this by subtracting 1 from the descent of the font engines. We now remove the +1 and the work arounds. Change-Id: I7e25d49b97ac892015d3328f32d70eb9a7c2d88f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp')
-rw-r--r--tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
index 0b5486dd5a..4dbdf9a4f1 100644
--- a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
@@ -140,7 +140,7 @@ void tst_QFontMetrics::metrics()
font = fdb.font(family, style, 12);
QFontMetrics fontmetrics(font);
- QCOMPARE(fontmetrics.ascent() + fontmetrics.descent() + 1,
+ QCOMPARE(fontmetrics.ascent() + fontmetrics.descent(),
fontmetrics.height());
QCOMPARE(fontmetrics.height() + fontmetrics.leading(),
@@ -156,7 +156,7 @@ void tst_QFontMetrics::metrics()
font = fdb.font(family, style, size);
QFontMetrics fontmetrics(font);
- QCOMPARE(fontmetrics.ascent() + fontmetrics.descent() + 1,
+ QCOMPARE(fontmetrics.ascent() + fontmetrics.descent(),
fontmetrics.height());
QCOMPARE(fontmetrics.height() + fontmetrics.leading(),
fontmetrics.lineSpacing());