summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-05-31 11:57:46 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-05-31 11:58:36 (GMT)
commit57a1049b86044ed28909b297412724b066453790 (patch)
tree90502d2a6f8c1502b3ab7ecc075c48adc7de75b3 /tests
parenta4c77a2cae0e4dfbccfe6db76153209b2a9d647f (diff)
downloadQt-57a1049b86044ed28909b297412724b066453790.zip
Qt-57a1049b86044ed28909b297412724b066453790.tar.gz
Qt-57a1049b86044ed28909b297412724b066453790.tar.bz2
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qfontmetrics/tst_qfontmetrics.cpp12
1 files changed, 0 insertions, 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<QFontMetricsF>();
}
-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"