diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-10-30 05:24:51 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-10-30 05:24:51 (GMT) |
commit | 46eec6d54bad7a686b3dd5cd6e4aa8577d38740d (patch) | |
tree | e4c828d1d1456b3fafe74a339562263b3f2c156d /tests/auto/qfontmetrics | |
parent | d85d7addc5084ee7d5de31dec562437f9c31c35d (diff) | |
parent | d788c0127b86d8245aa0a8e2472562f444d98ee9 (diff) | |
download | Qt-46eec6d54bad7a686b3dd5cd6e4aa8577d38740d.zip Qt-46eec6d54bad7a686b3dd5cd6e4aa8577d38740d.tar.gz Qt-46eec6d54bad7a686b3dd5cd6e4aa8577d38740d.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts:
src/declarative/qml/qmlcomponentjs.cpp
src/declarative/qml/qmlcomponentjs_p.h
src/declarative/qml/qmlcomponentjs_p_p.h
Diffstat (limited to 'tests/auto/qfontmetrics')
-rw-r--r-- | tests/auto/qfontmetrics/tst_qfontmetrics.cpp | 14 |
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 + } } |