summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-10-29 07:56:49 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-10-29 07:56:49 (GMT)
commitfaa524768b0d8a1e5f18ee58bc12496f77649a1e (patch)
tree7dae8e9e10c45471d0c9c12d267c7cb2c4097d64 /tests/auto/qfontmetrics/tst_qfontmetrics.cpp
parentca1361116bf36d1afe9cbcc293e171260978f315 (diff)
parente7c1be332bc89a8e56ec90eb865c9bd8ac14752b (diff)
downloadQt-faa524768b0d8a1e5f18ee58bc12496f77649a1e.zip
Qt-faa524768b0d8a1e5f18ee58bc12496f77649a1e.tar.gz
Qt-faa524768b0d8a1e5f18ee58bc12496f77649a1e.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto/qfontmetrics/tst_qfontmetrics.cpp')
-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
+ }
}