From 57a1049b86044ed28909b297412724b066453790 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 31 May 2010 13:57:46 +0200 Subject: Removed bogus autotest QFontMetrics::bearingIncludedInBoundingRect The assumption that italic text is wider than unstyled text is wrong, and will fail for some fonts. The only way to test this would be to create a custom font for it, but the test is not useful enough to warrant this, so it's been removed. --- tests/auto/qfontmetrics/tst_qfontmetrics.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp index 46f2b15..6c91c7b 100644 --- a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp +++ b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp @@ -73,7 +73,6 @@ private slots: void averageCharWidth(); void elidedMultiLength(); void elidedMultiLengthF(); - void bearingIncludedInBoundingRect(); }; tst_QFontMetrics::tst_QFontMetrics() @@ -251,16 +250,5 @@ void tst_QFontMetrics::elidedMultiLengthF() elidedMultiLength_helper(); } -void tst_QFontMetrics::bearingIncludedInBoundingRect() -{ - QFont font; - font.setItalic(true); - QRect brectItalic = QFontMetrics(font).boundingRect("ITALIC"); - font.setItalic(false); - QRect brectNormal = QFontMetrics(font).boundingRect("ITALIC"); - - QVERIFY(brectItalic.width() > brectNormal.width()); -} - QTEST_MAIN(tst_QFontMetrics) #include "tst_qfontmetrics.moc" -- cgit v0.12