summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfontmetrics
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-27 18:49:33 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-27 19:18:30 (GMT)
commitdf0001a3d62938c713b351c7e59228b803ec5670 (patch)
tree77916241f85ea2c31d283f04f20ffa321b5e68f0 /tests/auto/qfontmetrics
parentb209ab1e2139cb50e26bbeeb094da9a6a4a8a067 (diff)
downloadQt-df0001a3d62938c713b351c7e59228b803ec5670.zip
Qt-df0001a3d62938c713b351c7e59228b803ec5670.tar.gz
Qt-df0001a3d62938c713b351c7e59228b803ec5670.tar.bz2
QFontMetrics test
For commit b209ab1e2139cb5
Diffstat (limited to 'tests/auto/qfontmetrics')
-rw-r--r--tests/auto/qfontmetrics/tst_qfontmetrics.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
index 6b2f0fe..e80f8e0 100644
--- a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
@@ -100,6 +100,20 @@ void tst_QFontMetrics::same()
QFontMetrics fm(font);
const QString text = QLatin1String("Some stupid STRING");
QCOMPARE(fm.size(0, text), fm.size(0, text)) ;
+
+ {
+ QImage image;
+ QFontMetrics fm2(font, &image);
+ QString text2 = QLatin1String("Foo Foo");
+ QCOMPARE(fm2.size(0, text2), fm2.size(0, text2)); //used to crash
+ }
+
+ {
+ QImage image;
+ QFontMetricsF fm3(font, &image);
+ QString text2 = QLatin1String("Foo Foo");
+ QCOMPARE(fm3.size(0, text2), fm3.size(0, text2)); //used to crash
+ }
}